[PATCH] D41342: [WIP][InstCombine] Missed optimization in math expression: simplify calls exp functions
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 20:03:20 PST 2017
hfinkel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:737
+ match(Op1, m_Intrinsic<Intrinsic::exp>(m_Value(Opnd1)))) {
+ Builder.setFastMathFlags(I.getFastMathFlags());
+ Value *FAddVal = Builder.CreateFAdd(Opnd0, Opnd1);
----------------
Needs
BuilderTy::FastMathFlagGuard Guard(Builder);
first (so that the flags will get unset in the builder as required).
================
Comment at: lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:739
+ Value *FAddVal = Builder.CreateFAdd(Opnd0, Opnd1);
+ Value *Exp = Intrinsic::getDeclaration(I.getModule(), Intrinsic::exp, I.getType());
+ Value *ExpCall = Builder.CreateCall(Exp, FAddVal);
----------------
Line is too long.
https://reviews.llvm.org/D41342
More information about the llvm-commits
mailing list