[llvm] [VPlan] Simplify BLEND %a, %b, NOT(%m) -> BLEND %b, %a, %m. (PR #128375)

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 12:16:21 PST 2025


================
@@ -47,10 +47,8 @@ define void @smax_call_uniform(ptr %dst, i64 %x) {
 ; CHECK:       [[PRED_UREM_CONTINUE6]]:
 ; CHECK-NEXT:    [[TMP12:%.*]] = tail call i64 @llvm.smax.i64(i64 [[TMP4]], i64 0)
 ; CHECK-NEXT:    [[TMP13:%.*]] = tail call i64 @llvm.smax.i64(i64 [[TMP9]], i64 0)
-; CHECK-NEXT:    [[TMP14:%.*]] = extractelement <2 x i1> [[TMP1]], i32 0
-; CHECK-NEXT:    [[P:%.*]] = select i1 [[TMP14]], i64 [[TMP12]], i64 1
-; CHECK-NEXT:    [[TMP15:%.*]] = extractelement <2 x i1> [[TMP1]], i32 0
-; CHECK-NEXT:    [[PREDPHI7:%.*]] = select i1 [[TMP15]], i64 [[TMP13]], i64 1
+; CHECK-NEXT:    [[P:%.*]] = select i1 [[C]], i64 1, i64 [[TMP12]]
----------------
ayalz wrote:

(Old mask TMP14 turns out to be NOT C.. and same for TMP15.)

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


More information about the llvm-commits mailing list