[PATCH] D50035: [SLC] Expand simplification of pow() for vector types

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 13:42:21 PDT 2018


evandro added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1171-1172
+  // Bail out if simplifying libcalls to pow() is disabled.
+  if (!hasUnaryFloatFn(TLI, Ty, LibFunc_pow, LibFunc_powf, LibFunc_powl))
+    return nullptr;
+
----------------
spatel wrote:
> Why do we need this check? In all of the affected transforms, we're not transforming *to* pow(). Is there a known bug without this check? Given that we have a pow intrinsic, I don't see the problem.
Without this check, `pow()` would be simplified even with `-disable-simplify-libcalls` and `pow-3.ll` would fail.


https://reviews.llvm.org/D50035





More information about the llvm-commits mailing list