[llvm] [InstCombine] optimize powi(X,Y) * X with Ofast (PR #69998)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 03:15:03 PST 2024
================
@@ -716,6 +716,18 @@ Instruction *InstCombinerImpl::visitFMul(BinaryOperator &I) {
return replaceInstUsesWith(I, Pow);
}
+ // powi(X, Y) * X --> powi(X, Y+1)
+ // X * powi(X, Y) --> powi(X, Y+1)
+ if (match(&I, m_c_FMul(m_OneUse(m_Intrinsic<Intrinsic::powi>(m_Value(X),
----------------
vfdff wrote:
oh, sorry, please ignore that. I have rebase it on this PR (commit 86b9575) because C/C++ code formatter, and forget to update the reply.
https://github.com/llvm/llvm-project/pull/69998
More information about the llvm-commits
mailing list