[PATCH] D41940: [InstSimplify] Missed optimization in math expression: log10(pow(10.0, x)) == x, log2(pow(2.0, x)) == x
Dmitry Venikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 29 05:43:05 PST 2019
Quolyk marked an inline comment as done.
Quolyk added inline comments.
================
Comment at: lib/Analysis/InstructionSimplify.cpp:4944
+ (match(Op0, m_Intrinsic<Intrinsic::exp2>(m_Value(X))) ||
+ match(Op0, m_Intrinsic<Intrinsic::pow>(m_SpecificFP(2.0),
+ m_Value(X))))) return X;
----------------
lebedev.ri wrote:
> Hmm, do we want to canonicalize `Intrinsic::pow(2.0, x)` to `exp2(x)` instead ?
If `Intrinsic::pow(2.0, x)` to `exp2(x)` transform is useful somewhere else or you have strong opinion about it we do. Otherwise I don't see the reason for this.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D41940/new/
https://reviews.llvm.org/D41940
More information about the llvm-commits
mailing list