[llvm] [VPlan] Sink single-scalar VPI to replicate regions (PR #208906)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 23:32:46 PDT 2026
================
@@ -216,7 +216,8 @@ define void @single_incoming_needs_predication(i64 %a, i64 %b) {
; CHECK-NEXT: [[TMP9:%.*]] = extractelement <2 x i1> [[TMP2]], i64 1
; CHECK-NEXT: br i1 [[TMP9]], label [[PRED_LOAD_IF1:%.*]], label [[PRED_LOAD_CONTINUE2]]
; CHECK: pred.load.if1:
-; CHECK-NEXT: [[TMP10:%.*]] = add i16 [[TMP1]], 1
+; CHECK-NEXT: [[TMP17:%.*]] = trunc i64 [[INDEX]] to i16
----------------
artagnon wrote:
Hm, can you clarify why you think this is a regression? Instead of truncating the index in the vector body, and using it in a replicate region, we now truncate and use the index in the replicate region's use-site? Should be better now, as we truncate the index only when the predicate requires it, as opposed to always?
https://github.com/llvm/llvm-project/pull/208906
More information about the llvm-commits
mailing list