[PATCH] D26518: [AArch64] Compute the Newton series for reciprocals natively
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 11 00:44:42 PST 2016
jmolloy requested changes to this revision.
jmolloy added a reviewer: jmolloy.
jmolloy added a comment.
This revision now requires changes to proceed.
Hi Evandro,
Some comments (purely technical this time, thank goodness!) :)
James
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4658
DAG, ExtraSteps)) {
- UseOneConst = true;
+ SDLoc DL(Operand);
+ EVT VT = Operand.getValueType();
----------------
This seems a bit of a hack. Can we at least get a comment saying this is working around the model somehow?
Can Sanjay comment on how the model was meant to be used where targets have native step support?
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4681
+ // Correct the result if the operand is 0.0.
+ Estimate = DAG.getNode(VT.isVector() ? ISD::VSELECT : ISD::SELECT, DL,
+ VT, Eq, Operand, Estimate);
----------------
Why do you need this? Is this to preserve sign-of-zero?
You don't need this if the original operation was marked nsz or fast.
Repository:
rL LLVM
https://reviews.llvm.org/D26518
More information about the llvm-commits
mailing list