[PATCH] D22104: [SimplifyLibCalls] pow(x, 0.5) -> fabs(sqrt(x)) (finite-only-mode)

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 11:55:44 PDT 2016


majnemer added inline comments.

================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1071
@@ +1070,3 @@
+        emitUnaryFloatFnCall(Sqrt, "fabs", B, Callee->getAttributes());
+    if (isFiniteMathMode(F))
+      return FAbs;
----------------
Hmm.  Why not check to see if the call-site is annotated with `ninf nnan`?


http://reviews.llvm.org/D22104





More information about the llvm-commits mailing list