[PATCH] R600: Implement getRsqrtEstimate
Hal Finkel
hfinkel at anl.gov
Mon Oct 6 18:33:08 PDT 2014
----- Original Message -----
> From: "Matt Arsenault" <Matthew.Arsenault at amd.com>
> To: "Matthew Arsenault" <Matthew.Arsenault at amd.com>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Monday, October 6, 2014 8:23:18 PM
> Subject: [PATCH] R600: Implement getRsqrtEstimate
>
> Only do for f32 since I'm unclear on both what this is expecting
> for the refinement steps in terms of accuracy, and what
> f64 instruction actually provides.
It seems that the comment describing the convergence rate never moved out of the original PowerPC implementation. Here it is:
// Convergence is quadratic, so we essentially double the number of digits
// correct after every iteration. For both FRE and FRSQRTE, the minimum
// architected relative accuracy is 2^-5. When hasRecipPrec(), this is
// 2^-14. IEEE float has 23 digits and double has 52 digits.
RefinementSteps = Subtarget.hasRecipPrec() ? 1 : 3;
if (VT.getScalarType() == MVT::f64)
++RefinementSteps;
I hope this helps ;)
-Hal
>
> http://reviews.llvm.org/D5636
>
> Files:
> lib/Target/R600/AMDGPUISelLowering.cpp
> lib/Target/R600/AMDGPUISelLowering.h
> test/CodeGen/R600/fsqrt.ll
> test/CodeGen/R600/rsq.ll
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list