1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 ; Test that we generate a .cur
5 ; CHECK: v{{[0-9]*}}.cur
7 ; Function Attrs: nounwind
8 define void @f0(i8* noalias nocapture readonly %a0, i32 %a1, i32 %a2, <16 x i32>* %a3, <16 x i32>* %a4) #0 {
10 br i1 undef, label %b1, label %b3
15 b2: ; preds = %b2, %b1
16 %v0 = phi i8* [ %a0, %b1 ], [ %v4, %b2 ]
17 %v1 = phi i32 [ 0, %b1 ], [ %v23, %b2 ]
18 %v2 = phi <16 x i32> [ zeroinitializer, %b1 ], [ %v6, %b2 ]
19 %v3 = phi <16 x i32> [ zeroinitializer, %b1 ], [ zeroinitializer, %b2 ]
20 %v4 = getelementptr inbounds i8, i8* %v0, i32 64
21 %v5 = bitcast i8* %v4 to <16 x i32>*
22 %v6 = load <16 x i32>, <16 x i32>* %v5, align 64, !tbaa !0
23 %v7 = load <16 x i32>, <16 x i32>* %a3, align 64, !tbaa !0
24 %v8 = tail call <16 x i32> @llvm.hexagon.V6.valignbi(<16 x i32> %v6, <16 x i32> %v2, i32 4)
25 %v9 = tail call <16 x i32> @llvm.hexagon.V6.valignbi(<16 x i32> zeroinitializer, <16 x i32> %v3, i32 4)
26 %v10 = tail call <16 x i32> @llvm.hexagon.V6.valignbi(<16 x i32> %v7, <16 x i32> zeroinitializer, i32 4)
27 %v11 = tail call <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32> %v8, <16 x i32> %v2)
28 %v12 = tail call <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32> %v10, <16 x i32> zeroinitializer)
29 %v13 = tail call <32 x i32> @llvm.hexagon.V6.vrmpybusi(<32 x i32> %v11, i32 0, i32 0)
30 %v14 = tail call <32 x i32> @llvm.hexagon.V6.vrmpybusi.acc(<32 x i32> %v13, <32 x i32> zeroinitializer, i32 undef, i32 0)
31 %v15 = tail call <32 x i32> @llvm.hexagon.V6.vrmpybusi.acc(<32 x i32> %v14, <32 x i32> undef, i32 undef, i32 0)
32 %v16 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %v15)
33 %v17 = tail call <16 x i32> @llvm.hexagon.V6.vasrwh(<16 x i32> %v16, <16 x i32> undef, i32 %a1)
34 %v18 = tail call <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32> undef, <16 x i32> %v17)
35 store <16 x i32> %v18, <16 x i32>* %a3, align 64, !tbaa !0
36 %v19 = tail call <32 x i32> @llvm.hexagon.V6.vrmpybusi.acc(<32 x i32> zeroinitializer, <32 x i32> %v12, i32 undef, i32 1)
37 %v20 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %v19)
38 %v21 = tail call <16 x i32> @llvm.hexagon.V6.vasrwh(<16 x i32> %v20, <16 x i32> undef, i32 %a1)
39 %v22 = tail call <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32> %v21, <16 x i32> undef)
40 store <16 x i32> %v22, <16 x i32>* %a4, align 64, !tbaa !0
41 %v23 = add nsw i32 %v1, 64
42 %v24 = icmp slt i32 %v23, %a2
43 br i1 %v24, label %b2, label %b3
45 b3: ; preds = %b2, %b0
49 declare <16 x i32> @llvm.hexagon.V6.valignbi(<16 x i32>, <16 x i32>, i32) #1
50 declare <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32>, <16 x i32>) #1
51 declare <32 x i32> @llvm.hexagon.V6.vrmpybusi(<32 x i32>, i32, i32) #1
52 declare <32 x i32> @llvm.hexagon.V6.vrmpybusi.acc(<32 x i32>, <32 x i32>, i32, i32) #1
53 declare <16 x i32> @llvm.hexagon.V6.vasrwh(<16 x i32>, <16 x i32>, i32) #1
54 declare <16 x i32> @llvm.hexagon.V6.hi(<32 x i32>) #1
55 declare <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32>, <16 x i32>) #1
57 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }
58 attributes #1 = { nounwind readnone }
61 !1 = !{!"omnipotent char", !2, i64 0}
62 !2 = !{!"Simple C/C++ TBAA"}