1 ; RUN: llc -mtriple=hexagon -mcpu=hexagonv73 -O2 -mattr=+hvxv73,hvx-length64b < %s | FileCheck %s
2 ; CHECK: .p2align{{.*}}5
4 ; Function Attrs: nounwind
5 define void @wobble(ptr noalias nocapture readonly %arg, i32 %arg1, i32 %arg2, i32 %arg3, ptr noalias nocapture %arg4, i32 %arg5) #0 {
7 %ashr = ashr i32 %arg3, 2
8 %ashr6 = ashr i32 %arg3, 1
9 %add = add nsw i32 %ashr6, %ashr
10 %icmp = icmp sgt i32 %arg2, 0
11 br i1 %icmp, label %bb7, label %bb61
14 %sdiv = sdiv i32 %arg1, 64
15 %icmp8 = icmp sgt i32 %arg1, 63
18 bb9: ; preds = %bb57, %bb7
19 %phi = phi i32 [ 0, %bb7 ], [ %add58, %bb57 ]
20 %ashr10 = ashr exact i32 %phi, 1
21 %mul = mul nsw i32 %ashr10, %arg3
22 br i1 %icmp8, label %bb11, label %bb57
25 %add12 = add nsw i32 %phi, 1
26 %mul13 = mul nsw i32 %add12, %arg5
27 %mul14 = mul nsw i32 %phi, %arg5
28 %add15 = add i32 %add, %mul
29 %add16 = add i32 %mul, %ashr
30 %add17 = add i32 %mul, %ashr6
31 %getelementptr = getelementptr inbounds i8, ptr %arg4, i32 %mul13
32 %getelementptr18 = getelementptr inbounds i8, ptr %arg4, i32 %mul14
33 %getelementptr19 = getelementptr inbounds i16, ptr %arg, i32 %add15
34 %getelementptr20 = getelementptr inbounds i16, ptr %arg, i32 %add16
35 %getelementptr21 = getelementptr inbounds i16, ptr %arg, i32 %add17
36 %getelementptr22 = getelementptr inbounds i16, ptr %arg, i32 %mul
37 %bitcast = bitcast ptr %getelementptr to ptr
38 %bitcast23 = bitcast ptr %getelementptr18 to ptr
39 %bitcast24 = bitcast ptr %getelementptr19 to ptr
40 %bitcast25 = bitcast ptr %getelementptr20 to ptr
41 %bitcast26 = bitcast ptr %getelementptr21 to ptr
42 %bitcast27 = bitcast ptr %getelementptr22 to ptr
45 bb28: ; preds = %bb28, %bb11
46 %phi29 = phi i32 [ 0, %bb11 ], [ %add54, %bb28 ]
47 %phi30 = phi ptr [ %bitcast27, %bb11 ], [ %getelementptr36, %bb28 ]
48 %phi31 = phi ptr [ %bitcast26, %bb11 ], [ %getelementptr37, %bb28 ]
49 %phi32 = phi ptr [ %bitcast25, %bb11 ], [ %getelementptr39, %bb28 ]
50 %phi33 = phi ptr [ %bitcast24, %bb11 ], [ %getelementptr41, %bb28 ]
51 %phi34 = phi ptr [ %bitcast, %bb11 ], [ %getelementptr53, %bb28 ]
52 %phi35 = phi ptr [ %bitcast23, %bb11 ], [ %getelementptr52, %bb28 ]
53 %getelementptr36 = getelementptr inbounds <16 x i32>, ptr %phi30, i32 1
54 %load = load <16 x i32>, ptr %phi30, align 64, !tbaa !1
55 %getelementptr37 = getelementptr inbounds <16 x i32>, ptr %phi31, i32 1
56 %load38 = load <16 x i32>, ptr %phi31, align 64, !tbaa !1
57 %getelementptr39 = getelementptr inbounds <16 x i32>, ptr %phi32, i32 1
58 %load40 = load <16 x i32>, ptr %phi32, align 64, !tbaa !1
59 %getelementptr41 = getelementptr inbounds <16 x i32>, ptr %phi33, i32 1
60 %load42 = load <16 x i32>, ptr %phi33, align 64, !tbaa !1
61 %call = tail call <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32> %load, <16 x i32> %load38)
62 %call43 = tail call <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32> %load, <16 x i32> %load38)
63 %call44 = tail call <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32> %load40, <16 x i32> %load42)
64 %call45 = tail call <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32> %load40, <16 x i32> %load42)
65 %call46 = tail call <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32> %call, <16 x i32> %call44)
66 %call47 = tail call <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32> %call, <16 x i32> %call44)
67 %call48 = tail call <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32> %call43, <16 x i32> %call45)
68 %call49 = tail call <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32> %call43, <16 x i32> %call45)
69 %call50 = tail call <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32> %call47, <16 x i32> %call46)
70 %call51 = tail call <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32> %call49, <16 x i32> %call48)
71 %getelementptr52 = getelementptr inbounds <16 x i32>, ptr %phi35, i32 1
72 store <16 x i32> %call50, ptr %phi35, align 64, !tbaa !1
73 %getelementptr53 = getelementptr inbounds <16 x i32>, ptr %phi34, i32 1
74 store <16 x i32> %call51, ptr %phi34, align 64, !tbaa !1
75 %add54 = add nsw i32 %phi29, 1
76 %icmp55 = icmp slt i32 %add54, %sdiv
77 br i1 %icmp55, label %bb28, label %bb56
82 bb57: ; preds = %bb56, %bb9
83 %add58 = add nsw i32 %phi, 2
84 %icmp59 = icmp slt i32 %add58, %arg2
85 br i1 %icmp59, label %bb9, label %bb60
90 bb61: ; preds = %bb60, %bb
94 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
95 declare <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32>, <16 x i32>) #1
97 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
98 declare <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32>, <16 x i32>) #1
100 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
101 declare <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32>, <16 x i32>) #1
103 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
104 declare <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32>, <16 x i32>) #1
106 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
107 declare <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32>, <16 x i32>) #1
109 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
110 attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
115 !1 = !{!2, !2, i64 0}
116 !2 = !{!"omnipotent char", !3, i64 0}
117 !3 = !{!"Simple C/C++ TBAA"}