[llvm] [VPlan] Materialize VF and VFxUF using VPInstructions. (PR #152879)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 10 22:05:34 PDT 2025


================
@@ -85,8 +85,7 @@ define void @foo(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
 ; NO-VP-DEF-NEXT:    [[MIN_ITERS_CHECK:%.*]] = icmp ult i64 [[N:%.*]], [[TMP0]]
 ; NO-VP-DEF-NEXT:    br i1 [[MIN_ITERS_CHECK]], label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
 ; NO-VP-DEF:       vector.ph:
-; NO-VP-DEF-NEXT:    [[TMP1:%.*]] = call i64 @llvm.vscale.i64()
-; NO-VP-DEF-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N]], [[TMP1]]
+; NO-VP-DEF-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N]], 1
----------------
lukel97 wrote:

How come the VF ends up getting simplified to 1 here?

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


More information about the llvm-commits mailing list