[PATCH] D22975: Compute the Newton series natively

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 13:02:33 PDT 2016


t.p.northover added inline comments.

================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14669
@@ +14668,3 @@
+      Est = DAG.getNode(VT.isVector() ? ISD::VSELECT : ISD::SELECT, DL, VT,
+                        ZeroCmp, Op, Est);
+      AddToWorklist(Est.getNode());
----------------
spatel wrote:
> Ah, I see the diff now. But this is a target-independent transform, so isn't using 'Zero' in the select the more specific, and therefore the better, construct? This suggests that AArch64 is missing a fold that checks if an operand of a select is a zero; x86 must have this somewhere to allow the transform from blendv to andn?
Using `Op` also gets the correct value for -0. I'm not entirely sure how much that matters though given that we're in fast-math anyway.


Repository:
  rL LLVM

https://reviews.llvm.org/D22975





More information about the llvm-commits mailing list