[PATCH] D28479: [SimplifyLibCalls] pow(x, -0.5) -> 1.0 / sqrt(x)

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 13:35:50 PST 2017


majnemer added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1084-1085
+
+      // Here we cannot lower to an intrinsic because C99 sqrt() and llvm.sqrt
+      // are not guaranteed to have the same semantics.
+      Value *Sqrt = emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc::sqrt), B,
----------------
Doesn't hasUsnafeAlgebra make this irrelevant?


https://reviews.llvm.org/D28479





More information about the llvm-commits mailing list