[llvm] [InstCombine] fold `(icmp eq/ne (or disjoint x, C0), C1)` -> `(icmp eq/ne x, C0^C1)` (PR #87734)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 08:30:50 PDT 2024


================
@@ -2049,6 +2050,16 @@ Instruction *InstCombinerImpl::foldICmpOrConstant(ICmpInst &Cmp,
   }
 
   Value *OrOp0 = Or->getOperand(0), *OrOp1 = Or->getOperand(1);
+
+  // (icmp eq/ne (or disjoint x, C0), C1)
----------------
goldsteinn wrote:

We have some other equality folds here, I think we should move them all when/if we move them.

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


More information about the llvm-commits mailing list