[llvm] [InstCombine] optimize powi(X,Y) * X with Ofast (PR #69998)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 02:16:30 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),
----------------
arsenm wrote:

This commit isn't upstream, or in a PR? Did you mean to link a PR with it?

https://github.com/llvm/llvm-project/pull/69998


More information about the llvm-commits mailing list