[llvm] [InstCombine] Fold Xor with or disjoint (PR #105992)
Amr Hesham via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 10:48:42 PDT 2024
================
@@ -4706,6 +4706,13 @@ Instruction *InstCombinerImpl::visitXor(BinaryOperator &I) {
return Xor;
Value *X, *Y;
+
+ // (A | B) ^ C -> (A ^ C) ^ B
+ if (match(Op0, m_OneUse(m_c_DisjointOr(m_Value(X), m_Value(Y))))) {
----------------
AmrDeveloper wrote:
Thanks for suggestion, i used M
https://github.com/llvm/llvm-project/pull/105992
More information about the llvm-commits
mailing list