[llvm] [LV] Calculating explicit vector length using vector trip count (PR #89580)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 02:50:12 PDT 2024


================
@@ -58,12 +50,12 @@ define void @gather_scatter(ptr noalias %in, ptr noalias %out, ptr noalias %inde
 ; IF-EVL-NEXT:    [[INDEX_EVL_NEXT]] = add i64 [[TMP23]], [[EVL_BASED_IV]]
 ; IF-EVL-NEXT:    [[INDEX_NEXT]] = add i64 [[INDEX1]], [[TMP10]]
 ; IF-EVL-NEXT:    [[VEC_IND_NEXT]] = add <vscale x 2 x i64> [[VEC_IND]], [[DOTSPLAT]]
-; IF-EVL-NEXT:    [[TMP24:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]
+; IF-EVL-NEXT:    [[TMP24:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N]]
----------------
fhahn wrote:

I'm not sure how this is correct if `%N` isn't a multiple of the VF? `INDEX_NEXT` is incremented by `2 * vscale`;

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


More information about the llvm-commits mailing list