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

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 00:14:39 PST 2023


================
@@ -177,6 +177,15 @@ void Instruction::setNonNeg(bool b) {
                          (b * PossiblyNonNegInst::NonNeg);
 }
 
+bool Instruction::hasAllowReassocOfAllOperand() const {
+  return all_of(operands(), [](Value *V) {
+    if (!isa<IntrinsicInst>(V))
----------------
vfdff wrote:

Done, updated with `<FPMathOperator>`.

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


More information about the llvm-commits mailing list