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.
Details
Details
- Reviewers
arsenm
Diff Detail
Diff Detail
Event Timeline
Comment Actions
- Original Message -----
From: "Matt Arsenault" <Matthew.Arsenault@amd.com>
To: "Matthew Arsenault" <Matthew.Arsenault@amd.com>
Cc: llvm-commits@cs.uiuc.edu
Sent: Monday, October 6, 2014 8:23:18 PM
Subject: [PATCH] R600: Implement getRsqrtEstimateOnly 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
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@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits