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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 04:38:13 PST 2023


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

I think allowing the reassoc flag to spread to its neighbors is an overly aggressive interpretation. I think a strict interpretation where both instructions require the reassoc flag is the more expressive option. As in, I disagree with the premise of the comment in this test 

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


More information about the llvm-commits mailing list