1 ; RUN: opt -S -passes=loop-vectorize -mattr=+sve -mtriple aarch64-unknown-linux-gnu -force-vector-width=2 -pass-remarks-analysis=loop-vectorize -pass-remarks-missed=loop-vectorize < %s 2>%t | FileCheck %s
2 ; RUN: FileCheck %s --check-prefix=CHECK-REMARKS < %t
4 ; CHECK-REMARKS: UserVF ignored because of invalid costs.
5 ; CHECK-REMARKS: Recipe with invalid costs prevented vectorization at VF=(vscale x 1, vscale x 2): alloca
6 ; CHECK-REMARKS: Recipe with invalid costs prevented vectorization at VF=(vscale x 1): store
7 define void @alloca(ptr %vla, i64 %N) {
8 ; CHECK-LABEL: @alloca(
15 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
16 %alloca = alloca i32, align 16
17 %arrayidx = getelementptr inbounds ptr, ptr %vla, i64 %iv
18 store ptr %alloca, ptr %arrayidx, align 8
19 %iv.next = add nuw nsw i64 %iv, 1
20 %exitcond.not = icmp eq i64 %iv.next, %N
21 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !0
24 call void @foo(ptr nonnull %vla)
28 declare void @foo(ptr)
31 !1 = !{!"llvm.loop.vectorize.scalable.enable", i1 true}