1 ; RUN: opt -loop-vectorize -force-vector-width=4 -S -o - < %s | FileCheck %s
2 %arrayt = type [64 x i32]
4 @v_146 = external global %arrayt, align 1
6 ; Since the program has well defined behavior, it should not introduce store poison
8 ; CHECK-NEXT: br label %vector.body
10 ; CHECK: store <4 x i32> zeroinitializer,
11 ; CHECK: br i1 %{{.*}}, label %middle.block, label %vector.body
17 for.cond: ; preds = %cond.end, %entry
18 %storemerge = phi i16 [ 0, %entry ], [ %inc, %cond.end ]
19 %cmp = icmp slt i16 %storemerge, 15
20 br i1 %cmp, label %for.body, label %for.end
22 for.body: ; preds = %for.cond
23 br i1 true, label %cond.false, label %land.rhs
25 land.rhs: ; preds = %for.body
26 br i1 poison, label %cond.end, label %cond.false
28 cond.false: ; preds = %for.body, %land.rhs
31 cond.end: ; preds = %land.rhs, %cond.false
32 %cond = phi i32 [ 0, %cond.false ], [ 1, %land.rhs ]
33 %arrayidx = getelementptr inbounds %arrayt, %arrayt* @v_146, i16 0, i16 %storemerge
34 store i32 %cond, i32* %arrayidx, align 1
35 %inc = add nsw i16 %storemerge, 1
38 for.end: ; preds = %for.cond