blob: badab1686fcf16c4c7d728819c9abc9672836b3c [file] [log] [blame]
Ron Liebermanda5df7c2016-09-17 16:21:09 +00001; RUN: llc -march=hexagon -O2 -mcpu=hexagonv60 < %s | FileCheck %s
2; This was aborting while processing SUnits.
3
4; CHECK: vmem
5
6source_filename = "bugpoint-output-bdb0052.bc"
7target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
8target triple = "hexagon-unknown--elf"
9
10; Function Attrs: nounwind readnone
11declare <16 x i32> @llvm.hexagon.V6.lo(<32 x i32>) #0
12
13; Function Attrs: nounwind readnone
14declare <16 x i32> @llvm.hexagon.V6.hi(<32 x i32>) #0
15
16; Function Attrs: nounwind readnone
17declare <32 x i32> @llvm.hexagon.V6.vshuffvdd(<16 x i32>, <16 x i32>, i32) #0
18
19; Function Attrs: nounwind readnone
20declare <32 x i32> @llvm.hexagon.V6.vdealvdd(<16 x i32>, <16 x i32>, i32) #0
21
22; Function Attrs: nounwind readnone
23declare <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32>, <16 x i32>) #0
24
25; Function Attrs: nounwind readnone
26declare <16 x i32> @llvm.hexagon.V6.vshufeh(<16 x i32>, <16 x i32>) #0
27
28; Function Attrs: nounwind readnone
29declare <16 x i32> @llvm.hexagon.V6.vshufoh(<16 x i32>, <16 x i32>) #0
30
31; Function Attrs: nounwind readnone
32declare <32 x i32> @llvm.hexagon.V6.vmpyuhv(<16 x i32>, <16 x i32>) #0
33
34; Function Attrs: nounwind readnone
35declare <16 x i32> @llvm.hexagon.V6.vaslw.acc(<16 x i32>, <16 x i32>, i32) #0
36
37define void @__error_op_vmpy_v__uh_v__uh__1() #1 {
38entry:
39 %in_u16.host181 = load i16*, i16** undef, align 4
40 %in_u32.host182 = load i32*, i32** undef, align 4
41 br label %"for op_vmpy_v__uh_v__uh__1.s0.y"
42
43"for op_vmpy_v__uh_v__uh__1.s0.y": ; preds = %"end for op_vmpy_v__uh_v__uh__1.s0.x.x", %entry
44 %op_vmpy_v__uh_v__uh__1.s0.y = phi i32 [ 0, %entry ], [ %63, %"end for op_vmpy_v__uh_v__uh__1.s0.x.x" ]
45 %0 = mul nuw nsw i32 %op_vmpy_v__uh_v__uh__1.s0.y, 768
46 %1 = add nuw nsw i32 %0, 32
47 %2 = add nuw nsw i32 %0, 64
48 %3 = add nuw nsw i32 %0, 96
49 br label %"for op_vmpy_v__uh_v__uh__1.s0.x.x"
50
51"for op_vmpy_v__uh_v__uh__1.s0.x.x": ; preds = %"for op_vmpy_v__uh_v__uh__1.s0.x.x", %"for op_vmpy_v__uh_v__uh__1.s0.y"
52 %.phi210 = phi i32* [ %in_u32.host182, %"for op_vmpy_v__uh_v__uh__1.s0.y" ], [ %.inc211.3, %"for op_vmpy_v__uh_v__uh__1.s0.x.x" ]
53 %.phi213 = phi i16* [ %in_u16.host181, %"for op_vmpy_v__uh_v__uh__1.s0.y" ], [ %.inc214.3, %"for op_vmpy_v__uh_v__uh__1.s0.x.x" ]
54 %op_vmpy_v__uh_v__uh__1.s0.x.x = phi i32 [ 0, %"for op_vmpy_v__uh_v__uh__1.s0.y" ], [ %61, %"for op_vmpy_v__uh_v__uh__1.s0.x.x" ]
55 %4 = mul nuw nsw i32 %op_vmpy_v__uh_v__uh__1.s0.x.x, 32
56 %5 = bitcast i32* %.phi210 to <16 x i32>*
57 %6 = load <16 x i32>, <16 x i32>* %5, align 64, !tbaa !1
58 %7 = add nuw nsw i32 %4, 16
59 %8 = getelementptr inbounds i32, i32* %in_u32.host182, i32 %7
60 %9 = bitcast i32* %8 to <16 x i32>*
61 %10 = load <16 x i32>, <16 x i32>* %9, align 64, !tbaa !1
62 %11 = tail call <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32> %10, <16 x i32> %6)
63 %e.i = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %11) #2
64 %o.i = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %11) #2
65 %r.i = tail call <32 x i32> @llvm.hexagon.V6.vdealvdd(<16 x i32> %o.i, <16 x i32> %e.i, i32 -4) #2
66 %12 = bitcast i16* %.phi213 to <16 x i32>*
67 %13 = load <16 x i32>, <16 x i32>* %12, align 64, !tbaa !4
68 %a_lo.i = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %r.i) #2
69 %a_hi.i = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %r.i) #2
70 %a_e.i = tail call <16 x i32> @llvm.hexagon.V6.vshufeh(<16 x i32> %a_hi.i, <16 x i32> %a_lo.i) #2
71 %a_o.i = tail call <16 x i32> @llvm.hexagon.V6.vshufoh(<16 x i32> %a_hi.i, <16 x i32> %a_lo.i) #2
72 %ab_e.i = tail call <32 x i32> @llvm.hexagon.V6.vmpyuhv(<16 x i32> %a_e.i, <16 x i32> %13) #2
73 %ab_o.i = tail call <32 x i32> @llvm.hexagon.V6.vmpyuhv(<16 x i32> %a_o.i, <16 x i32> %13) #2
74 %a_lo.i.i = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %ab_e.i) #2
75 %l_lo.i.i = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %ab_o.i) #2
76 %s_lo.i.i = tail call <16 x i32> @llvm.hexagon.V6.vaslw.acc(<16 x i32> %a_lo.i.i, <16 x i32> %l_lo.i.i, i32 16) #2
77 %l_hi.i.i = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %ab_o.i) #2
78 %s_hi.i.i = tail call <16 x i32> @llvm.hexagon.V6.vaslw.acc(<16 x i32> undef, <16 x i32> %l_hi.i.i, i32 16) #2
79 %s.i.i = tail call <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32> %s_hi.i.i, <16 x i32> %s_lo.i.i) #2
80 %e.i189 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %s.i.i) #2
81 %o.i190 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %s.i.i) #2
82 %r.i191 = tail call <32 x i32> @llvm.hexagon.V6.vshuffvdd(<16 x i32> %o.i190, <16 x i32> %e.i189, i32 -4) #2
83 %14 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %r.i191)
84 %15 = add nuw nsw i32 %4, %0
85 %16 = getelementptr inbounds i32, i32* undef, i32 %15
86 %17 = bitcast i32* %16 to <16 x i32>*
87 store <16 x i32> %14, <16 x i32>* %17, align 64, !tbaa !6
88 %18 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %r.i191)
89 store <16 x i32> %18, <16 x i32>* undef, align 64, !tbaa !6
90 %.inc211 = getelementptr i32, i32* %.phi210, i32 32
91 %.inc214 = getelementptr i16, i16* %.phi213, i32 32
92 %19 = bitcast i32* %.inc211 to <16 x i32>*
93 %20 = load <16 x i32>, <16 x i32>* %19, align 64, !tbaa !1
94 %21 = add nuw nsw i32 %4, 48
95 %22 = getelementptr inbounds i32, i32* %in_u32.host182, i32 %21
96 %23 = bitcast i32* %22 to <16 x i32>*
97 %24 = load <16 x i32>, <16 x i32>* %23, align 64, !tbaa !1
98 %25 = tail call <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32> %24, <16 x i32> %20)
99 %e.i.1 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %25) #2
100 %r.i.1 = tail call <32 x i32> @llvm.hexagon.V6.vdealvdd(<16 x i32> undef, <16 x i32> %e.i.1, i32 -4) #2
101 %26 = bitcast i16* %.inc214 to <16 x i32>*
102 %27 = load <16 x i32>, <16 x i32>* %26, align 64, !tbaa !4
103 %a_lo.i.1 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %r.i.1) #2
104 %a_e.i.1 = tail call <16 x i32> @llvm.hexagon.V6.vshufeh(<16 x i32> undef, <16 x i32> %a_lo.i.1) #2
105 %a_o.i.1 = tail call <16 x i32> @llvm.hexagon.V6.vshufoh(<16 x i32> undef, <16 x i32> %a_lo.i.1) #2
106 %ab_e.i.1 = tail call <32 x i32> @llvm.hexagon.V6.vmpyuhv(<16 x i32> %a_e.i.1, <16 x i32> %27) #2
107 %ab_o.i.1 = tail call <32 x i32> @llvm.hexagon.V6.vmpyuhv(<16 x i32> %a_o.i.1, <16 x i32> %27) #2
108 %a_lo.i.i.1 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %ab_e.i.1) #2
109 %s_lo.i.i.1 = tail call <16 x i32> @llvm.hexagon.V6.vaslw.acc(<16 x i32> %a_lo.i.i.1, <16 x i32> undef, i32 16) #2
110 %a_hi.i.i.1 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %ab_e.i.1) #2
111 %l_hi.i.i.1 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %ab_o.i.1) #2
112 %s_hi.i.i.1 = tail call <16 x i32> @llvm.hexagon.V6.vaslw.acc(<16 x i32> %a_hi.i.i.1, <16 x i32> %l_hi.i.i.1, i32 16) #2
113 %s.i.i.1 = tail call <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32> %s_hi.i.i.1, <16 x i32> %s_lo.i.i.1) #2
114 %e.i189.1 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %s.i.i.1) #2
115 %o.i190.1 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %s.i.i.1) #2
116 %r.i191.1 = tail call <32 x i32> @llvm.hexagon.V6.vshuffvdd(<16 x i32> %o.i190.1, <16 x i32> %e.i189.1, i32 -4) #2
117 %28 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %r.i191.1)
118 %29 = add nuw nsw i32 %1, %4
119 %30 = getelementptr inbounds i32, i32* undef, i32 %29
120 %31 = bitcast i32* %30 to <16 x i32>*
121 store <16 x i32> %28, <16 x i32>* %31, align 64, !tbaa !6
122 %32 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %r.i191.1)
123 %33 = add nuw nsw i32 %29, 16
124 %34 = getelementptr inbounds i32, i32* undef, i32 %33
125 %35 = bitcast i32* %34 to <16 x i32>*
126 store <16 x i32> %32, <16 x i32>* %35, align 64, !tbaa !6
127 %.inc211.1 = getelementptr i32, i32* %.phi210, i32 64
128 %.inc214.1 = getelementptr i16, i16* %.phi213, i32 64
129 %36 = bitcast i32* %.inc211.1 to <16 x i32>*
130 %37 = load <16 x i32>, <16 x i32>* %36, align 64, !tbaa !1
131 %38 = add nuw nsw i32 %4, 80
132 %39 = getelementptr inbounds i32, i32* %in_u32.host182, i32 %38
133 %40 = bitcast i32* %39 to <16 x i32>*
134 %41 = load <16 x i32>, <16 x i32>* %40, align 64, !tbaa !1
135 %42 = tail call <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32> %41, <16 x i32> %37)
136 %e.i.2 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %42) #2
137 %o.i.2 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %42) #2
138 %r.i.2 = tail call <32 x i32> @llvm.hexagon.V6.vdealvdd(<16 x i32> %o.i.2, <16 x i32> %e.i.2, i32 -4) #2
139 %43 = bitcast i16* %.inc214.1 to <16 x i32>*
140 %44 = load <16 x i32>, <16 x i32>* %43, align 64, !tbaa !4
141 %a_lo.i.2 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %r.i.2) #2
142 %a_hi.i.2 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %r.i.2) #2
143 %a_e.i.2 = tail call <16 x i32> @llvm.hexagon.V6.vshufeh(<16 x i32> %a_hi.i.2, <16 x i32> %a_lo.i.2) #2
144 %a_o.i.2 = tail call <16 x i32> @llvm.hexagon.V6.vshufoh(<16 x i32> %a_hi.i.2, <16 x i32> %a_lo.i.2) #2
145 %ab_e.i.2 = tail call <32 x i32> @llvm.hexagon.V6.vmpyuhv(<16 x i32> %a_e.i.2, <16 x i32> %44) #2
146 %ab_o.i.2 = tail call <32 x i32> @llvm.hexagon.V6.vmpyuhv(<16 x i32> %a_o.i.2, <16 x i32> %44) #2
147 %l_lo.i.i.2 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %ab_o.i.2) #2
148 %s_lo.i.i.2 = tail call <16 x i32> @llvm.hexagon.V6.vaslw.acc(<16 x i32> undef, <16 x i32> %l_lo.i.i.2, i32 16) #2
149 %a_hi.i.i.2 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %ab_e.i.2) #2
150 %l_hi.i.i.2 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %ab_o.i.2) #2
151 %s_hi.i.i.2 = tail call <16 x i32> @llvm.hexagon.V6.vaslw.acc(<16 x i32> %a_hi.i.i.2, <16 x i32> %l_hi.i.i.2, i32 16) #2
152 %s.i.i.2 = tail call <32 x i32> @llvm.hexagon.V6.vcombine(<16 x i32> %s_hi.i.i.2, <16 x i32> %s_lo.i.i.2) #2
153 %e.i189.2 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %s.i.i.2) #2
154 %o.i190.2 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %s.i.i.2) #2
155 %r.i191.2 = tail call <32 x i32> @llvm.hexagon.V6.vshuffvdd(<16 x i32> %o.i190.2, <16 x i32> %e.i189.2, i32 -4) #2
156 %45 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %r.i191.2)
157 %46 = add nuw nsw i32 %2, %4
158 %47 = getelementptr inbounds i32, i32* undef, i32 %46
159 %48 = bitcast i32* %47 to <16 x i32>*
160 store <16 x i32> %45, <16 x i32>* %48, align 64, !tbaa !6
161 %49 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %r.i191.2)
162 %50 = add nuw nsw i32 %46, 16
163 %51 = getelementptr inbounds i32, i32* undef, i32 %50
164 %52 = bitcast i32* %51 to <16 x i32>*
165 store <16 x i32> %49, <16 x i32>* %52, align 64, !tbaa !6
166 %e.i189.3 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> undef) #2
167 %r.i191.3 = tail call <32 x i32> @llvm.hexagon.V6.vshuffvdd(<16 x i32> undef, <16 x i32> %e.i189.3, i32 -4) #2
168 %53 = tail call <16 x i32> @llvm.hexagon.V6.lo(<32 x i32> %r.i191.3)
169 %54 = add nuw nsw i32 %3, %4
170 %55 = getelementptr inbounds i32, i32* undef, i32 %54
171 %56 = bitcast i32* %55 to <16 x i32>*
172 store <16 x i32> %53, <16 x i32>* %56, align 64, !tbaa !6
173 %57 = tail call <16 x i32> @llvm.hexagon.V6.hi(<32 x i32> %r.i191.3)
174 %58 = add nuw nsw i32 %54, 16
175 %59 = getelementptr inbounds i32, i32* undef, i32 %58
176 %60 = bitcast i32* %59 to <16 x i32>*
177 store <16 x i32> %57, <16 x i32>* %60, align 64, !tbaa !6
178 %61 = add nuw nsw i32 %op_vmpy_v__uh_v__uh__1.s0.x.x, 4
179 %62 = icmp eq i32 %61, 24
180 %.inc211.3 = getelementptr i32, i32* %.phi210, i32 128
181 %.inc214.3 = getelementptr i16, i16* %.phi213, i32 128
182 br i1 %62, label %"end for op_vmpy_v__uh_v__uh__1.s0.x.x", label %"for op_vmpy_v__uh_v__uh__1.s0.x.x"
183
184"end for op_vmpy_v__uh_v__uh__1.s0.x.x": ; preds = %"for op_vmpy_v__uh_v__uh__1.s0.x.x"
185 %63 = add nuw nsw i32 %op_vmpy_v__uh_v__uh__1.s0.y, 1
186 br label %"for op_vmpy_v__uh_v__uh__1.s0.y"
187}
188
189attributes #0 = { nounwind readnone }
Sumanth Gundapanenie1983bc2017-10-18 18:07:07 +0000190attributes #1 = { "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }
Ron Liebermanda5df7c2016-09-17 16:21:09 +0000191attributes #2 = { nounwind }
192
193!llvm.module.flags = !{!0}
194
195!0 = !{i32 2, !"halide_mattrs", !"+hvx"}
196!1 = !{!2, !2, i64 0}
197!2 = !{!"in_u32", !3}
198!3 = !{!"Halide buffer"}
199!4 = !{!5, !5, i64 0}
200!5 = !{!"in_u16", !3}
201!6 = !{!7, !7, i64 0}
202!7 = !{!"op_vmpy_v__uh_v__uh__1", !3}