[PATCH] D22975: [AArch64] Compute the Newton series iterations natively
Evandro Menezes via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 07:51:18 PDT 2016
evandro marked an inline comment as done.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14500
@@ -14499,2 +14499,3 @@
-SDValue DAGCombiner::BuildReciprocalEstimate(SDValue Op, SDNodeFlags *Flags) {
+/// Newton iteration for a function: F(X) is X_{i+1} = X_i - F(X_i)/F'(X_i)
+/// For the reciprocal, we need to find the zero of the function:
----------------
t.p.northover wrote:
> All of the changes in this file appear to be refactoring, is that right?
>
> Mostly they look OK (though should be committed separately). But I'm not convinced moving the sqrt(0) handling into BuildReciprocalEstimate is an improvement.
It's actually necessary to inform getRsqrtEstimate() if the estimate is for sqrt() so that, if the target prefers to generate the whole sequence, it has to know if it's for sqrt() or its reciprocal, since the final product, in case of sqrt(), is currently done inside buildSqrtNR{One,Two}Const().
Repository:
rL LLVM
https://reviews.llvm.org/D22975
More information about the llvm-commits
mailing list