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

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 01:22:57 PST 2023


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

hi @arsenm ,refer to https://github.com/llvm/llvm-project/blob/ebc3302725350c44aaf5f97ce7ba484e30b3efa8/llvm/include/llvm/IR/Operator.h#L310, I'll add the operand  list as following, do you have any suggestions for that?
```
    case Instruction::FNeg:
    case Instruction::FAdd:
    case Instruction::FSub:
    case Instruction::FMul:
    case Instruction::FDiv:
    case Instruction::FRem:
```

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


More information about the llvm-commits mailing list