[llvm] [VPlan] Explicitly reassociate header mask in logical and (PR #180898)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 15 19:03:48 PST 2026
================
@@ -219,7 +217,8 @@ define void @test_exit_branch_cost(ptr %dst, ptr noalias %x.ptr, ptr noalias %y.
; COMMON-NEXT: store i64 0, ptr [[DST_3]], align 8
; COMMON-NEXT: br label %[[PRED_STORE_CONTINUE9]]
; COMMON: [[PRED_STORE_CONTINUE9]]:
-; COMMON-NEXT: [[TMP13:%.*]] = select <2 x i1> [[TMP7]], <2 x i1> [[TMP2]], <2 x i1> zeroinitializer
+; COMMON-NEXT: [[TMP22:%.*]] = select <2 x i1> [[TMP7]], <2 x i1> [[BROADCAST_SPLAT]], <2 x i1> zeroinitializer
+; COMMON-NEXT: [[TMP13:%.*]] = select <2 x i1> [[TMP22]], <2 x i1> [[BROADCAST_SPLAT3]], <2 x i1> zeroinitializer
----------------
lukel97 wrote:
The mask that gets reassociated here isn't a header mask but an edge mask. We should probably add back a more principled form of reassociation for binops in general. It might be worth looking to instcombine to see how it handles it.
https://github.com/llvm/llvm-project/pull/180898
More information about the llvm-commits
mailing list