[llvm] Update foldFMulReassoc to respect absent fast-math flags (PR #88589)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 13:53:26 PDT 2024
================
@@ -636,26 +636,43 @@ Instruction *InstCombinerImpl::foldFMulReassoc(BinaryOperator &I) {
// expression.
if (match(Op1, m_Constant(C)) && C->isFiniteNonZeroFP()) {
Constant *C1;
- if (match(Op0, m_OneUse(m_FDiv(m_Constant(C1), m_Value(X))))) {
+ if (match(Op0,
+ m_AllowReassoc(m_OneUse(m_FDiv(m_Constant(C1), m_Value(X)))))) {
----------------
arsenm wrote:
Yes, something like that would be better. It shouldn't be the dissociated matcher it is today
https://github.com/llvm/llvm-project/pull/88589
More information about the llvm-commits
mailing list