1 ; RUN: opt < %s -passes=loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -S | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 ; Function Attrs: nounwind uwtable
6 define i32 @test1(ptr nocapture %a, ptr nocapture readonly %b) #0 {
8 call void @llvm.pseudoprobe(i64 3666282617048535130, i64 1, i32 0, i64 -1)
11 for.body: ; preds = %for.body, %entry
12 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
13 %arrayidx = getelementptr inbounds float, ptr %b, i64 %indvars.iv
14 %0 = load float, ptr %arrayidx, align 4
15 %conv = fptosi float %0 to i32
16 %arrayidx2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv
17 store i32 %conv, ptr %arrayidx2, align 4
18 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
19 %exitcond = icmp eq i64 %indvars.iv.next, 1600
20 call void @llvm.pseudoprobe(i64 3666282617048535130, i64 2, i32 0, i64 -1)
21 br i1 %exitcond, label %for.end, label %for.body
23 for.end: ; preds = %for.body
24 call void @llvm.pseudoprobe(i64 3666282617048535130, i64 3, i32 0, i64 -1)
31 ; CHECK: load <4 x float>, ptr %{{.*}}
32 ; CHECK: store <4 x i32> %{{.*}}, ptr %{{.*}}
33 ; CHECK-COUNT-4: call void @llvm.pseudoprobe(i64 3666282617048535130, i64 2, i32 0, i64 -1)
34 ; CHECK: %index.next = add nuw i64 %index, 4
39 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite)
40 declare void @llvm.pseudoprobe(i64, i64, i32, i64) #1
42 attributes #0 = { nounwind uwtable }
43 attributes #1 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }
45 !llvm.pseudo_probe_desc = !{!0}
47 !0 = !{i64 3666282617048535130, i64 52824598631, !"test1"}