1; RUN: opt -passes=loop-vectorize -force-vector-width=4 %s | FileCheck %s
2
3%struct.foo = type { [400 x double] }
4
5; Make sure we do not crash when dropping runtime checks.
6
7; CHECK-NOT: vector.body
8
9define void @barney(%struct.foo* %ptr) {
10entry:
11  br label %loop
12
13loop:
14  %tmp3 = phi i64 [ 0, %entry ], [ %tmp18, %loop ]
15  %tmp4 = getelementptr inbounds %struct.foo, %struct.foo* %ptr, i64 undef
16  %tmp5 = bitcast %struct.foo* %tmp4 to i64*
17  store i64 0, i64* %tmp5, align 8
18  %tmp8 = add i64 1, %tmp3
19  %tmp10 = getelementptr inbounds %struct.foo, %struct.foo* %ptr, i64 %tmp8
20  %tmp11 = bitcast %struct.foo* %tmp10 to i64*
21  store i64 1, i64* %tmp11, align 8
22  %tmp14 = add i64 undef, %tmp3
23  %tmp16 = getelementptr inbounds %struct.foo, %struct.foo* %ptr, i64 %tmp14
24  %tmp17 = bitcast %struct.foo* %tmp16 to i64*
25  store i64 2, i64* %tmp17, align 8
26  %tmp18 = add nuw nsw i64 %tmp3, 4
27  %c = icmp ult i64 %tmp18, 400
28  br i1 %c, label %exit, label %loop
29
30exit:
31  ret void
32}
33