[llvm] [InstCombine] Decompose more icmps into masks (PR #110836)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 09:21:57 PDT 2024
================
@@ -3335,10 +3335,8 @@ define i1 @icmp_eq_or_z_or_pow2orz_fail_bad_pred2(i8 %x, i8 %y) {
define i1 @and_slt_to_mask(i8 %x) {
; CHECK-LABEL: @and_slt_to_mask(
-; CHECK-NEXT: [[CMP:%.*]] = icmp slt i8 [[X:%.*]], -124
-; CHECK-NEXT: [[AND:%.*]] = and i8 [[X]], 2
-; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 [[AND]], 0
-; CHECK-NEXT: [[AND2:%.*]] = and i1 [[CMP]], [[CMP2]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i8 [[X:%.*]], -2
+; CHECK-NEXT: [[AND2:%.*]] = icmp eq i8 [[TMP1]], -128
----------------
goldsteinn wrote:
See: https://github.com/llvm/llvm-project/pull/110880
https://github.com/llvm/llvm-project/pull/110836
More information about the llvm-commits
mailing list