1; RUN: opt < %s  -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -S | FileCheck %s
2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3target triple = "x86_64-unknown-linux-gnu"
4
5; Function Attrs: nounwind uwtable
6define i32 @test1(i32* nocapture %a, float* nocapture readonly %b) #0 {
7entry:
8  br label %for.body
9
10for.body:                                         ; preds = %for.body, %entry
11  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
12  %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv
13  %0 = load float, float* %arrayidx, align 4, !tbaa !0
14  %conv = fptosi float %0 to i32
15  %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
16  store i32 %conv, i32* %arrayidx2, align 4, !tbaa !4
17  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
18  %exitcond = icmp eq i64 %indvars.iv.next, 1600
19  br i1 %exitcond, label %for.end, label %for.body
20
21for.end:                                          ; preds = %for.body
22  ret i32 0
23}
24
25; CHECK-LABEL: @test1
26; CHECK: load <4 x float>, <4 x float>* %{{.*}}, align 4, !tbaa ![[TFLT:[0-9]+]]
27; CHECK: store <4 x i32> %{{.*}}, <4 x i32>* %{{.*}}, align 4, !tbaa ![[TINT:[0-9]+]]
28; CHECK: ret i32 0
29
30; CHECK-DAG: ![[TFLT]] = !{![[TFLT1:[0-9]+]]
31; CHECK-DAG: ![[TFLT1]] = !{!"float"
32
33; CHECK-DAG: ![[TINT]] = !{![[TINT1:[0-9]+]]
34; CHECK-DAG: ![[TINT1]] = !{!"int"
35
36attributes #0 = { nounwind uwtable }
37
38!0 = !{!1, !1, i64 0}
39!1 = !{!"float", !2, i64 0}
40!2 = !{!"omnipotent char", !3, i64 0}
41!3 = !{!"Simple C/C++ TBAA"}
42!4 = !{!5, !5, i64 0}
43!5 = !{!"int", !2, i64 0}
44
45