[llvm] [InstCombine] optimize powi(X,Y)/X with Ofast (PR #67236)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 23 06:09:30 PDT 2023
================
@@ -1764,6 +1764,16 @@ Instruction *InstCombinerImpl::visitFDiv(BinaryOperator &I) {
return replaceInstUsesWith(I, Pow);
}
+ if (I.hasAllowReassoc() && I.hasNoInfs() &&
+ match(Op0, m_OneUse(m_Intrinsic<Intrinsic::powi>(m_Specific(Op1),
----------------
goldsteinn wrote:
This should also work for `powf` no?
https://github.com/llvm/llvm-project/pull/67236
More information about the llvm-commits
mailing list