[llvm] [VPlan] Sink single-scalar VPI to replicate regions (PR #208906)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 19 21:50:10 PDT 2026
================
@@ -585,31 +585,34 @@ define void @wide_iv_trunc(ptr %dst, i64 %N) {
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE6:.*]] ]
; CHECK-NEXT: [[VEC_IND:%.*]] = phi <4 x i64> [ <i64 0, i64 1, i64 2, i64 3>, %[[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], %[[PRED_STORE_CONTINUE6]] ]
; CHECK-NEXT: [[TMP2:%.*]] = icmp ule <4 x i64> [[VEC_IND]], [[BROADCAST_SPLAT]]
-; CHECK-NEXT: [[TMP1:%.*]] = trunc i64 [[INDEX]] to i32
----------------
lukel97 wrote:
I think this is also a header-mask-like replicate region, looks like it's checking `IV <= TC - 1`, so probably not profitable to sink this.
I wonder if a better heuristic for sinking instructions that we know can't be shared across individual lanes of a replicate region is `vputils::isUniformAcrossVFsAndUFs` or something.
https://github.com/llvm/llvm-project/pull/208906
More information about the llvm-commits
mailing list