[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 14:03:39 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,
----------------
davide wrote:
> majnemer wrote:
> > Doesn't hasUsnafeAlgebra make this irrelevant?
> Does it? I'm not entirely sure of the implications, see e.g. http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160808/380416.html @hfinkel
> (I'd leave the lowering to an intrinsic as a follow-up).
Of course... Sorry about that!
https://reviews.llvm.org/D28479
More information about the llvm-commits
mailing list