[llvm] [llvm-diff] Add associative on BinOp (PR #123314)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 13:51:39 PST 2025


================
@@ -536,6 +536,21 @@ class FunctionDifferenceEngine {
       return true;
     }
 
+    if (L->getNumOperands() == 2 &&
+        Instruction::isAssociative(L->getOpcode())) {
----------------
nikic wrote:

This should be isCommutative(), not isAssociative().

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


More information about the llvm-commits mailing list