1 ; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - | FileCheck %s
3 define <8 x i8> @vsras8(ptr %A, ptr %B) nounwind {
6 %tmp1 = load <8 x i8>, ptr %A
7 %tmp2 = load <8 x i8>, ptr %B
8 %tmp3 = ashr <8 x i8> %tmp2, < i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7 >
9 %tmp4 = add <8 x i8> %tmp1, %tmp3
13 define <4 x i16> @vsras16(ptr %A, ptr %B) nounwind {
14 ;CHECK-LABEL: vsras16:
16 %tmp1 = load <4 x i16>, ptr %A
17 %tmp2 = load <4 x i16>, ptr %B
18 %tmp3 = ashr <4 x i16> %tmp2, < i16 15, i16 15, i16 15, i16 15 >
19 %tmp4 = add <4 x i16> %tmp1, %tmp3
23 define <2 x i32> @vsras32(ptr %A, ptr %B) nounwind {
24 ;CHECK-LABEL: vsras32:
26 %tmp1 = load <2 x i32>, ptr %A
27 %tmp2 = load <2 x i32>, ptr %B
28 %tmp3 = ashr <2 x i32> %tmp2, < i32 31, i32 31 >
29 %tmp4 = add <2 x i32> %tmp1, %tmp3
33 define <1 x i64> @vsras64(ptr %A, ptr %B) nounwind {
34 ;CHECK-LABEL: vsras64:
36 %tmp1 = load <1 x i64>, ptr %A
37 %tmp2 = load <1 x i64>, ptr %B
38 %tmp3 = ashr <1 x i64> %tmp2, < i64 63 >
39 %tmp4 = add <1 x i64> %tmp1, %tmp3
43 define <16 x i8> @vsraQs8(ptr %A, ptr %B) nounwind {
44 ;CHECK-LABEL: vsraQs8:
46 %tmp1 = load <16 x i8>, ptr %A
47 %tmp2 = load <16 x i8>, ptr %B
48 %tmp3 = ashr <16 x i8> %tmp2, < i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7 >
49 %tmp4 = add <16 x i8> %tmp1, %tmp3
53 define <8 x i16> @vsraQs16(ptr %A, ptr %B) nounwind {
54 ;CHECK-LABEL: vsraQs16:
56 %tmp1 = load <8 x i16>, ptr %A
57 %tmp2 = load <8 x i16>, ptr %B
58 %tmp3 = ashr <8 x i16> %tmp2, < i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15 >
59 %tmp4 = add <8 x i16> %tmp1, %tmp3
63 define <4 x i32> @vsraQs32(ptr %A, ptr %B) nounwind {
64 ;CHECK-LABEL: vsraQs32:
66 %tmp1 = load <4 x i32>, ptr %A
67 %tmp2 = load <4 x i32>, ptr %B
68 %tmp3 = ashr <4 x i32> %tmp2, < i32 31, i32 31, i32 31, i32 31 >
69 %tmp4 = add <4 x i32> %tmp1, %tmp3
73 define <2 x i64> @vsraQs64(ptr %A, ptr %B) nounwind {
74 ;CHECK-LABEL: vsraQs64:
76 %tmp1 = load <2 x i64>, ptr %A
77 %tmp2 = load <2 x i64>, ptr %B
78 %tmp3 = ashr <2 x i64> %tmp2, < i64 63, i64 63 >
79 %tmp4 = add <2 x i64> %tmp1, %tmp3
83 define <8 x i8> @vsrau8(ptr %A, ptr %B) nounwind {
86 %tmp1 = load <8 x i8>, ptr %A
87 %tmp2 = load <8 x i8>, ptr %B
88 %tmp3 = lshr <8 x i8> %tmp2, < i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7 >
89 %tmp4 = add <8 x i8> %tmp1, %tmp3
93 define <4 x i16> @vsrau16(ptr %A, ptr %B) nounwind {
94 ;CHECK-LABEL: vsrau16:
96 %tmp1 = load <4 x i16>, ptr %A
97 %tmp2 = load <4 x i16>, ptr %B
98 %tmp3 = lshr <4 x i16> %tmp2, < i16 15, i16 15, i16 15, i16 15 >
99 %tmp4 = add <4 x i16> %tmp1, %tmp3
103 define <2 x i32> @vsrau32(ptr %A, ptr %B) nounwind {
104 ;CHECK-LABEL: vsrau32:
106 %tmp1 = load <2 x i32>, ptr %A
107 %tmp2 = load <2 x i32>, ptr %B
108 %tmp3 = lshr <2 x i32> %tmp2, < i32 31, i32 31 >
109 %tmp4 = add <2 x i32> %tmp1, %tmp3
113 define <1 x i64> @vsrau64(ptr %A, ptr %B) nounwind {
114 ;CHECK-LABEL: vsrau64:
116 %tmp1 = load <1 x i64>, ptr %A
117 %tmp2 = load <1 x i64>, ptr %B
118 %tmp3 = lshr <1 x i64> %tmp2, < i64 63 >
119 %tmp4 = add <1 x i64> %tmp1, %tmp3
123 define <16 x i8> @vsraQu8(ptr %A, ptr %B) nounwind {
124 ;CHECK-LABEL: vsraQu8:
126 %tmp1 = load <16 x i8>, ptr %A
127 %tmp2 = load <16 x i8>, ptr %B
128 %tmp3 = lshr <16 x i8> %tmp2, < i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7 >
129 %tmp4 = add <16 x i8> %tmp1, %tmp3
133 define <8 x i16> @vsraQu16(ptr %A, ptr %B) nounwind {
134 ;CHECK-LABEL: vsraQu16:
136 %tmp1 = load <8 x i16>, ptr %A
137 %tmp2 = load <8 x i16>, ptr %B
138 %tmp3 = lshr <8 x i16> %tmp2, < i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15 >
139 %tmp4 = add <8 x i16> %tmp1, %tmp3
143 define <4 x i32> @vsraQu32(ptr %A, ptr %B) nounwind {
144 ;CHECK-LABEL: vsraQu32:
146 %tmp1 = load <4 x i32>, ptr %A
147 %tmp2 = load <4 x i32>, ptr %B
148 %tmp3 = lshr <4 x i32> %tmp2, < i32 31, i32 31, i32 31, i32 31 >
149 %tmp4 = add <4 x i32> %tmp1, %tmp3
153 define <2 x i64> @vsraQu64(ptr %A, ptr %B) nounwind {
154 ;CHECK-LABEL: vsraQu64:
156 %tmp1 = load <2 x i64>, ptr %A
157 %tmp2 = load <2 x i64>, ptr %B
158 %tmp3 = lshr <2 x i64> %tmp2, < i64 63, i64 63 >
159 %tmp4 = add <2 x i64> %tmp1, %tmp3
163 define <8 x i8> @vrsras8(ptr %A, ptr %B) nounwind {
164 ;CHECK-LABEL: vrsras8:
166 %tmp1 = load <8 x i8>, ptr %A
167 %tmp2 = load <8 x i8>, ptr %B
168 %tmp3 = call <8 x i8> @llvm.arm.neon.vrshifts.v8i8(<8 x i8> %tmp2, <8 x i8> < i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8 >)
169 %tmp4 = add <8 x i8> %tmp1, %tmp3
173 define <4 x i16> @vrsras16(ptr %A, ptr %B) nounwind {
174 ;CHECK-LABEL: vrsras16:
176 %tmp1 = load <4 x i16>, ptr %A
177 %tmp2 = load <4 x i16>, ptr %B
178 %tmp3 = call <4 x i16> @llvm.arm.neon.vrshifts.v4i16(<4 x i16> %tmp2, <4 x i16> < i16 -16, i16 -16, i16 -16, i16 -16 >)
179 %tmp4 = add <4 x i16> %tmp1, %tmp3
183 define <2 x i32> @vrsras32(ptr %A, ptr %B) nounwind {
184 ;CHECK-LABEL: vrsras32:
186 %tmp1 = load <2 x i32>, ptr %A
187 %tmp2 = load <2 x i32>, ptr %B
188 %tmp3 = call <2 x i32> @llvm.arm.neon.vrshifts.v2i32(<2 x i32> %tmp2, <2 x i32> < i32 -32, i32 -32 >)
189 %tmp4 = add <2 x i32> %tmp1, %tmp3
193 define <1 x i64> @vrsras64(ptr %A, ptr %B) nounwind {
194 ;CHECK-LABEL: vrsras64:
196 %tmp1 = load <1 x i64>, ptr %A
197 %tmp2 = load <1 x i64>, ptr %B
198 %tmp3 = call <1 x i64> @llvm.arm.neon.vrshifts.v1i64(<1 x i64> %tmp2, <1 x i64> < i64 -64 >)
199 %tmp4 = add <1 x i64> %tmp1, %tmp3
203 define <8 x i8> @vrsrau8(ptr %A, ptr %B) nounwind {
204 ;CHECK-LABEL: vrsrau8:
206 %tmp1 = load <8 x i8>, ptr %A
207 %tmp2 = load <8 x i8>, ptr %B
208 %tmp3 = call <8 x i8> @llvm.arm.neon.vrshiftu.v8i8(<8 x i8> %tmp2, <8 x i8> < i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8 >)
209 %tmp4 = add <8 x i8> %tmp1, %tmp3
213 define <4 x i16> @vrsrau16(ptr %A, ptr %B) nounwind {
214 ;CHECK-LABEL: vrsrau16:
216 %tmp1 = load <4 x i16>, ptr %A
217 %tmp2 = load <4 x i16>, ptr %B
218 %tmp3 = call <4 x i16> @llvm.arm.neon.vrshiftu.v4i16(<4 x i16> %tmp2, <4 x i16> < i16 -16, i16 -16, i16 -16, i16 -16 >)
219 %tmp4 = add <4 x i16> %tmp1, %tmp3
223 define <2 x i32> @vrsrau32(ptr %A, ptr %B) nounwind {
224 ;CHECK-LABEL: vrsrau32:
226 %tmp1 = load <2 x i32>, ptr %A
227 %tmp2 = load <2 x i32>, ptr %B
228 %tmp3 = call <2 x i32> @llvm.arm.neon.vrshiftu.v2i32(<2 x i32> %tmp2, <2 x i32> < i32 -32, i32 -32 >)
229 %tmp4 = add <2 x i32> %tmp1, %tmp3
233 define <1 x i64> @vrsrau64(ptr %A, ptr %B) nounwind {
234 ;CHECK-LABEL: vrsrau64:
236 %tmp1 = load <1 x i64>, ptr %A
237 %tmp2 = load <1 x i64>, ptr %B
238 %tmp3 = call <1 x i64> @llvm.arm.neon.vrshiftu.v1i64(<1 x i64> %tmp2, <1 x i64> < i64 -64 >)
239 %tmp4 = add <1 x i64> %tmp1, %tmp3
243 define <16 x i8> @vrsraQs8(ptr %A, ptr %B) nounwind {
244 ;CHECK-LABEL: vrsraQs8:
246 %tmp1 = load <16 x i8>, ptr %A
247 %tmp2 = load <16 x i8>, ptr %B
248 %tmp3 = call <16 x i8> @llvm.arm.neon.vrshifts.v16i8(<16 x i8> %tmp2, <16 x i8> < i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8 >)
249 %tmp4 = add <16 x i8> %tmp1, %tmp3
253 define <8 x i16> @vrsraQs16(ptr %A, ptr %B) nounwind {
254 ;CHECK-LABEL: vrsraQs16:
256 %tmp1 = load <8 x i16>, ptr %A
257 %tmp2 = load <8 x i16>, ptr %B
258 %tmp3 = call <8 x i16> @llvm.arm.neon.vrshifts.v8i16(<8 x i16> %tmp2, <8 x i16> < i16 -16, i16 -16, i16 -16, i16 -16, i16 -16, i16 -16, i16 -16, i16 -16 >)
259 %tmp4 = add <8 x i16> %tmp1, %tmp3
263 define <4 x i32> @vrsraQs32(ptr %A, ptr %B) nounwind {
264 ;CHECK-LABEL: vrsraQs32:
266 %tmp1 = load <4 x i32>, ptr %A
267 %tmp2 = load <4 x i32>, ptr %B
268 %tmp3 = call <4 x i32> @llvm.arm.neon.vrshifts.v4i32(<4 x i32> %tmp2, <4 x i32> < i32 -32, i32 -32, i32 -32, i32 -32 >)
269 %tmp4 = add <4 x i32> %tmp1, %tmp3
273 define <2 x i64> @vrsraQs64(ptr %A, ptr %B) nounwind {
274 ;CHECK-LABEL: vrsraQs64:
276 %tmp1 = load <2 x i64>, ptr %A
277 %tmp2 = load <2 x i64>, ptr %B
278 %tmp3 = call <2 x i64> @llvm.arm.neon.vrshifts.v2i64(<2 x i64> %tmp2, <2 x i64> < i64 -64, i64 -64 >)
279 %tmp4 = add <2 x i64> %tmp1, %tmp3
283 define <16 x i8> @vrsraQu8(ptr %A, ptr %B) nounwind {
284 ;CHECK-LABEL: vrsraQu8:
286 %tmp1 = load <16 x i8>, ptr %A
287 %tmp2 = load <16 x i8>, ptr %B
288 %tmp3 = call <16 x i8> @llvm.arm.neon.vrshiftu.v16i8(<16 x i8> %tmp2, <16 x i8> < i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8 >)
289 %tmp4 = add <16 x i8> %tmp1, %tmp3
293 define <8 x i16> @vrsraQu16(ptr %A, ptr %B) nounwind {
294 ;CHECK-LABEL: vrsraQu16:
296 %tmp1 = load <8 x i16>, ptr %A
297 %tmp2 = load <8 x i16>, ptr %B
298 %tmp3 = call <8 x i16> @llvm.arm.neon.vrshiftu.v8i16(<8 x i16> %tmp2, <8 x i16> < i16 -16, i16 -16, i16 -16, i16 -16, i16 -16, i16 -16, i16 -16, i16 -16 >)
299 %tmp4 = add <8 x i16> %tmp1, %tmp3
303 define <4 x i32> @vrsraQu32(ptr %A, ptr %B) nounwind {
304 ;CHECK-LABEL: vrsraQu32:
306 %tmp1 = load <4 x i32>, ptr %A
307 %tmp2 = load <4 x i32>, ptr %B
308 %tmp3 = call <4 x i32> @llvm.arm.neon.vrshiftu.v4i32(<4 x i32> %tmp2, <4 x i32> < i32 -32, i32 -32, i32 -32, i32 -32 >)
309 %tmp4 = add <4 x i32> %tmp1, %tmp3
313 define <2 x i64> @vrsraQu64(ptr %A, ptr %B) nounwind {
314 ;CHECK-LABEL: vrsraQu64:
316 %tmp1 = load <2 x i64>, ptr %A
317 %tmp2 = load <2 x i64>, ptr %B
318 %tmp3 = call <2 x i64> @llvm.arm.neon.vrshiftu.v2i64(<2 x i64> %tmp2, <2 x i64> < i64 -64, i64 -64 >)
319 %tmp4 = add <2 x i64> %tmp1, %tmp3
323 declare <8 x i8> @llvm.arm.neon.vrshifts.v8i8(<8 x i8>, <8 x i8>) nounwind readnone
324 declare <4 x i16> @llvm.arm.neon.vrshifts.v4i16(<4 x i16>, <4 x i16>) nounwind readnone
325 declare <2 x i32> @llvm.arm.neon.vrshifts.v2i32(<2 x i32>, <2 x i32>) nounwind readnone
326 declare <1 x i64> @llvm.arm.neon.vrshifts.v1i64(<1 x i64>, <1 x i64>) nounwind readnone
328 declare <8 x i8> @llvm.arm.neon.vrshiftu.v8i8(<8 x i8>, <8 x i8>) nounwind readnone
329 declare <4 x i16> @llvm.arm.neon.vrshiftu.v4i16(<4 x i16>, <4 x i16>) nounwind readnone
330 declare <2 x i32> @llvm.arm.neon.vrshiftu.v2i32(<2 x i32>, <2 x i32>) nounwind readnone
331 declare <1 x i64> @llvm.arm.neon.vrshiftu.v1i64(<1 x i64>, <1 x i64>) nounwind readnone
333 declare <16 x i8> @llvm.arm.neon.vrshifts.v16i8(<16 x i8>, <16 x i8>) nounwind readnone
334 declare <8 x i16> @llvm.arm.neon.vrshifts.v8i16(<8 x i16>, <8 x i16>) nounwind readnone
335 declare <4 x i32> @llvm.arm.neon.vrshifts.v4i32(<4 x i32>, <4 x i32>) nounwind readnone
336 declare <2 x i64> @llvm.arm.neon.vrshifts.v2i64(<2 x i64>, <2 x i64>) nounwind readnone
338 declare <16 x i8> @llvm.arm.neon.vrshiftu.v16i8(<16 x i8>, <16 x i8>) nounwind readnone
339 declare <8 x i16> @llvm.arm.neon.vrshiftu.v8i16(<8 x i16>, <8 x i16>) nounwind readnone
340 declare <4 x i32> @llvm.arm.neon.vrshiftu.v4i32(<4 x i32>, <4 x i32>) nounwind readnone
341 declare <2 x i64> @llvm.arm.neon.vrshiftu.v2i64(<2 x i64>, <2 x i64>) nounwind readnone