[llvm] [InstCombine] Fix the correctness of missing check reassoc attribute (PR #71277)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 17:51:30 PST 2023


================
@@ -177,6 +177,15 @@ void Instruction::setNonNeg(bool b) {
                          (b * PossiblyNonNegInst::NonNeg);
 }
 
+bool Instruction::hasAllowReassocOfAllOperand() const {
----------------
vfdff wrote:

hi @arsenm @jcranmer-intel @nikic 
  would you help to give some input on this?  I'm not sure if this reassoc flag can propagate this logic correctly?
 If it is correct, we should not need to check whether `the FPMathOperator of the instruction` has the reassoc flag when we try this combine.

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


More information about the llvm-commits mailing list