[llvm] [InstCombine] Fold `(icmp eq/ne (xor x, y), C1)` even if multiuse (PR #87275)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 12:11:14 PDT 2024
================
@@ -455,7 +455,7 @@ define i1 @icmp_or_xor_2_4_fail(i64 %x1, i64 %y1, i64 %x2, i64 %y2) {
; CHECK-NEXT: [[XOR1:%.*]] = xor i64 [[X2:%.*]], [[Y2:%.*]]
; CHECK-NEXT: [[OR:%.*]] = or i64 [[XOR]], [[XOR1]]
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[OR]], 0
-; CHECK-NEXT: [[CMP_1:%.*]] = icmp eq i64 [[XOR1]], 0
+; CHECK-NEXT: [[CMP_1:%.*]] = icmp eq i64 [[X2]], [[Y2]]
----------------
goldsteinn wrote:
We end up simplifying this entire thing on the next iteration.
https://github.com/llvm/llvm-project/pull/87275
More information about the llvm-commits
mailing list