[llvm] [VPlan] Use SCEV optimize VecTC-materialization for scalable (PR #193703)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 02:59:55 PDT 2026


================
@@ -319,8 +319,6 @@ define void @invalid_legacy_cost(i64 %N, ptr %x) #0 {
 ; COST1-NEXT:    [[MIN_ITERS_CHECK:%.*]] = icmp ult i64 [[TMP0]], 4
 ; COST1-NEXT:    br i1 [[MIN_ITERS_CHECK]], label %[[SCALAR_PH:.*]], label %[[VECTOR_PH:.*]]
 ; COST1:       [[VECTOR_PH]]:
-; COST1-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[TMP0]], 4
----------------
fhahn wrote:

I don't think this is correct, there is nothing that ensures `N` is a known multiple of 4. This is likely due to a predicate being needed but not generated?

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


More information about the llvm-commits mailing list