1 ; RUN: opt -loop-vectorize -scalable-vectorization=on -force-target-instruction-cost=1 -prefer-predicate-over-epilogue=predicate-dont-vectorize -S < %s 2>&1 | FileCheck %s
3 ; This test currently fails when the LV calculates a maximums safe
4 ; distance for scalable vectors, because the code to eliminate the tail is
5 ; pessimistic when scalable vectors are considered. This will be addressed
6 ; in a future patch, at which point we should be able to un-XFAIL the
7 ; test. The expected output is to vectorize this loop without predication
8 ; (and thus have unpredicated vector store).
11 ; CHECK: store <4 x i32>
13 target triple = "aarch64"
14 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
17 define void @f1(i32* %A) #0 {
22 %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
23 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %iv
24 store i32 1, i32* %arrayidx, align 4
25 %iv.next = add nuw nsw i64 %iv, 1
26 %exitcond = icmp ne i64 %iv.next, 1024
27 br i1 %exitcond, label %for.body, label %exit
33 attributes #0 = { "target-features"="+sve" }