1 ; RUN: opt -loop-vectorize -enable-arm-maskedldst < %s -S -o - | FileCheck %s
3 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
4 target triple = "thumbv8.1-m.main-none-eabi"
7 ; CHECK: llvm.masked.store.v4i32.p0v4i32
8 define void @test(i32* nocapture %A, i32 %n) #0 {
10 %cmp12 = icmp sgt i32 %n, 0
11 br i1 %cmp12, label %for.body.preheader, label %for.cond.cleanup
13 for.body.preheader: ; preds = %entry
16 for.body: ; preds = %for.body.preheader, %for.inc
17 %i.013 = phi i32 [ %inc, %for.inc ], [ 0, %for.body.preheader ]
18 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %i.013
19 %0 = load i32, i32* %arrayidx, align 4
21 %1 = icmp ult i32 %.off, 19
22 br i1 %1, label %if.then, label %for.inc
24 if.then: ; preds = %for.body
25 store i32 0, i32* %arrayidx, align 4
28 for.inc: ; preds = %for.body, %if.then
29 %inc = add nuw nsw i32 %i.013, 1
30 %exitcond = icmp eq i32 %inc, %n
31 br i1 %exitcond, label %for.cond.cleanup.loopexit, label %for.body
33 for.cond.cleanup.loopexit: ; preds = %for.inc
34 br label %for.cond.cleanup
36 for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry
40 attributes #0 = { "target-features"="+mve" }