[llvm] [InstCombine] Reassociate xor and disjoint or through zext (PR #214970)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 22:00:36 PDT 2026
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?=,
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?=,
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?=,
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?=,
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?=,
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?=,
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?=,
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?=,
=?utf-8?b?7KGw7JiB7KeEKEpveW91bmdqaW4p?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/214970 at github.com>
================
@@ -435,12 +435,19 @@ static bool simplifyAssocCastAssoc(BinaryOperator *BinOp1,
if (!BinOp2 || !BinOp2->hasOneUse())
return false;
- // `or disjoint` is equivalent to xor.
----------------
ParkHanbum wrote:
I believe SimplifyAssociativeOrCommutative should already be able to handle the commuted form. Was this logic added after confirming that the pattern does not reach BinOp2? I don't seem to see a test case covering that scenario.
https://github.com/llvm/llvm-project/pull/214970
More information about the llvm-commits
mailing list