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