[PATCH] D13994: Optimization for pow(x, n) where n is some constant
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 19:42:29 PDT 2015
majnemer added inline comments.
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1157
@@ +1156,3 @@
+ for (unsigned Exp = 2; Exp <= PowerOptThreshold; ++Exp) {
+ if (Op2C->isExactlyValue(Exp) || Op2C->isExactlyValue((int)-Exp)) {
+ Value *FMul = getPow(Op1, Exp, B);
----------------
If `Exp` is `72057594037927937`, it will be converted to `72057594037927936.0` when passing it to `isExactlyValue`. Is that OK?
http://reviews.llvm.org/D13994
More information about the llvm-commits
mailing list