• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -fallow-half-arguments-and-returns -O0 -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
3 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -fallow-half-arguments-and-returns -O0 -disable-O0-optnone -DPOLYMORPHIC -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
4 
5 #include <arm_mve.h>
6 
7 // CHECK-LABEL: @test_vshlq_n_s8(
8 // CHECK-NEXT:  entry:
9 // CHECK-NEXT:    [[TMP0:%.*]] = shl <16 x i8> [[A:%.*]], <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
10 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
11 //
test_vshlq_n_s8(int8x16_t a)12 int8x16_t test_vshlq_n_s8(int8x16_t a)
13 {
14 #ifdef POLYMORPHIC
15     return vshlq_n(a, 5);
16 #else /* POLYMORPHIC */
17     return vshlq_n_s8(a, 5);
18 #endif /* POLYMORPHIC */
19 }
20 
21 // CHECK-LABEL: @test_vshlq_n_s16(
22 // CHECK-NEXT:  entry:
23 // CHECK-NEXT:    [[TMP0:%.*]] = shl <8 x i16> [[A:%.*]], <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
24 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
25 //
test_vshlq_n_s16(int16x8_t a)26 int16x8_t test_vshlq_n_s16(int16x8_t a)
27 {
28 #ifdef POLYMORPHIC
29     return vshlq_n(a, 5);
30 #else /* POLYMORPHIC */
31     return vshlq_n_s16(a, 5);
32 #endif /* POLYMORPHIC */
33 }
34 
35 // CHECK-LABEL: @test_vshlq_n_s32(
36 // CHECK-NEXT:  entry:
37 // CHECK-NEXT:    [[TMP0:%.*]] = shl <4 x i32> [[A:%.*]], <i32 18, i32 18, i32 18, i32 18>
38 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
39 //
test_vshlq_n_s32(int32x4_t a)40 int32x4_t test_vshlq_n_s32(int32x4_t a)
41 {
42 #ifdef POLYMORPHIC
43     return vshlq_n(a, 18);
44 #else /* POLYMORPHIC */
45     return vshlq_n_s32(a, 18);
46 #endif /* POLYMORPHIC */
47 }
48 
49 // CHECK-LABEL: @test_vshlq_n_s8_trivial(
50 // CHECK-NEXT:  entry:
51 // CHECK-NEXT:    [[TMP0:%.*]] = shl <16 x i8> [[A:%.*]], zeroinitializer
52 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
53 //
test_vshlq_n_s8_trivial(int8x16_t a)54 int8x16_t test_vshlq_n_s8_trivial(int8x16_t a)
55 {
56 #ifdef POLYMORPHIC
57     return vshlq_n(a, 0);
58 #else /* POLYMORPHIC */
59     return vshlq_n_s8(a, 0);
60 #endif /* POLYMORPHIC */
61 }
62 
63 // CHECK-LABEL: @test_vshlq_n_s16_trivial(
64 // CHECK-NEXT:  entry:
65 // CHECK-NEXT:    [[TMP0:%.*]] = shl <8 x i16> [[A:%.*]], zeroinitializer
66 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
67 //
test_vshlq_n_s16_trivial(int16x8_t a)68 int16x8_t test_vshlq_n_s16_trivial(int16x8_t a)
69 {
70 #ifdef POLYMORPHIC
71     return vshlq_n(a, 0);
72 #else /* POLYMORPHIC */
73     return vshlq_n_s16(a, 0);
74 #endif /* POLYMORPHIC */
75 }
76 
77 // CHECK-LABEL: @test_vshlq_n_s32_trivial(
78 // CHECK-NEXT:  entry:
79 // CHECK-NEXT:    [[TMP0:%.*]] = shl <4 x i32> [[A:%.*]], zeroinitializer
80 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
81 //
test_vshlq_n_s32_trivial(int32x4_t a)82 int32x4_t test_vshlq_n_s32_trivial(int32x4_t a)
83 {
84 #ifdef POLYMORPHIC
85     return vshlq_n(a, 0);
86 #else /* POLYMORPHIC */
87     return vshlq_n_s32(a, 0);
88 #endif /* POLYMORPHIC */
89 }
90 
91 // CHECK-LABEL: @test_vshlq_n_u8(
92 // CHECK-NEXT:  entry:
93 // CHECK-NEXT:    [[TMP0:%.*]] = shl <16 x i8> [[A:%.*]], <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
94 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
95 //
test_vshlq_n_u8(uint8x16_t a)96 uint8x16_t test_vshlq_n_u8(uint8x16_t a)
97 {
98 #ifdef POLYMORPHIC
99     return vshlq_n(a, 3);
100 #else /* POLYMORPHIC */
101     return vshlq_n_u8(a, 3);
102 #endif /* POLYMORPHIC */
103 }
104 
105 // CHECK-LABEL: @test_vshlq_n_u16(
106 // CHECK-NEXT:  entry:
107 // CHECK-NEXT:    [[TMP0:%.*]] = shl <8 x i16> [[A:%.*]], <i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11>
108 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
109 //
test_vshlq_n_u16(uint16x8_t a)110 uint16x8_t test_vshlq_n_u16(uint16x8_t a)
111 {
112 #ifdef POLYMORPHIC
113     return vshlq_n(a, 11);
114 #else /* POLYMORPHIC */
115     return vshlq_n_u16(a, 11);
116 #endif /* POLYMORPHIC */
117 }
118 
119 // CHECK-LABEL: @test_vshlq_n_u32(
120 // CHECK-NEXT:  entry:
121 // CHECK-NEXT:    [[TMP0:%.*]] = shl <4 x i32> [[A:%.*]], <i32 7, i32 7, i32 7, i32 7>
122 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
123 //
test_vshlq_n_u32(uint32x4_t a)124 uint32x4_t test_vshlq_n_u32(uint32x4_t a)
125 {
126 #ifdef POLYMORPHIC
127     return vshlq_n(a, 7);
128 #else /* POLYMORPHIC */
129     return vshlq_n_u32(a, 7);
130 #endif /* POLYMORPHIC */
131 }
132 
133 // CHECK-LABEL: @test_vshlq_n_u8_trivial(
134 // CHECK-NEXT:  entry:
135 // CHECK-NEXT:    [[TMP0:%.*]] = shl <16 x i8> [[A:%.*]], zeroinitializer
136 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
137 //
test_vshlq_n_u8_trivial(uint8x16_t a)138 uint8x16_t test_vshlq_n_u8_trivial(uint8x16_t a)
139 {
140 #ifdef POLYMORPHIC
141     return vshlq_n(a, 0);
142 #else /* POLYMORPHIC */
143     return vshlq_n_u8(a, 0);
144 #endif /* POLYMORPHIC */
145 }
146 
147 // CHECK-LABEL: @test_vshlq_n_u16_trivial(
148 // CHECK-NEXT:  entry:
149 // CHECK-NEXT:    [[TMP0:%.*]] = shl <8 x i16> [[A:%.*]], zeroinitializer
150 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
151 //
test_vshlq_n_u16_trivial(uint16x8_t a)152 uint16x8_t test_vshlq_n_u16_trivial(uint16x8_t a)
153 {
154 #ifdef POLYMORPHIC
155     return vshlq_n(a, 0);
156 #else /* POLYMORPHIC */
157     return vshlq_n_u16(a, 0);
158 #endif /* POLYMORPHIC */
159 }
160 
161 // CHECK-LABEL: @test_vshlq_n_u32_trivial(
162 // CHECK-NEXT:  entry:
163 // CHECK-NEXT:    [[TMP0:%.*]] = shl <4 x i32> [[A:%.*]], zeroinitializer
164 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
165 //
test_vshlq_n_u32_trivial(uint32x4_t a)166 uint32x4_t test_vshlq_n_u32_trivial(uint32x4_t a)
167 {
168 #ifdef POLYMORPHIC
169     return vshlq_n(a, 0);
170 #else /* POLYMORPHIC */
171     return vshlq_n_u32(a, 0);
172 #endif /* POLYMORPHIC */
173 }
174 
175 // CHECK-LABEL: @test_vshrq_n_s8(
176 // CHECK-NEXT:  entry:
177 // CHECK-NEXT:    [[TMP0:%.*]] = ashr <16 x i8> [[A:%.*]], <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
178 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
179 //
test_vshrq_n_s8(int8x16_t a)180 int8x16_t test_vshrq_n_s8(int8x16_t a)
181 {
182 #ifdef POLYMORPHIC
183     return vshrq(a, 4);
184 #else /* POLYMORPHIC */
185     return vshrq_n_s8(a, 4);
186 #endif /* POLYMORPHIC */
187 }
188 
189 // CHECK-LABEL: @test_vshrq_n_s16(
190 // CHECK-NEXT:  entry:
191 // CHECK-NEXT:    [[TMP0:%.*]] = ashr <8 x i16> [[A:%.*]], <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
192 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
193 //
test_vshrq_n_s16(int16x8_t a)194 int16x8_t test_vshrq_n_s16(int16x8_t a)
195 {
196 #ifdef POLYMORPHIC
197     return vshrq(a, 10);
198 #else /* POLYMORPHIC */
199     return vshrq_n_s16(a, 10);
200 #endif /* POLYMORPHIC */
201 }
202 
203 // CHECK-LABEL: @test_vshrq_n_s32(
204 // CHECK-NEXT:  entry:
205 // CHECK-NEXT:    [[TMP0:%.*]] = ashr <4 x i32> [[A:%.*]], <i32 19, i32 19, i32 19, i32 19>
206 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
207 //
test_vshrq_n_s32(int32x4_t a)208 int32x4_t test_vshrq_n_s32(int32x4_t a)
209 {
210 #ifdef POLYMORPHIC
211     return vshrq(a, 19);
212 #else /* POLYMORPHIC */
213     return vshrq_n_s32(a, 19);
214 #endif /* POLYMORPHIC */
215 }
216 
217 // CHECK-LABEL: @test_vshrq_n_s8_trivial(
218 // CHECK-NEXT:  entry:
219 // CHECK-NEXT:    [[TMP0:%.*]] = ashr <16 x i8> [[A:%.*]], <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>
220 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
221 //
test_vshrq_n_s8_trivial(int8x16_t a)222 int8x16_t test_vshrq_n_s8_trivial(int8x16_t a)
223 {
224 #ifdef POLYMORPHIC
225     return vshrq(a, 8);
226 #else /* POLYMORPHIC */
227     return vshrq_n_s8(a, 8);
228 #endif /* POLYMORPHIC */
229 }
230 
231 // CHECK-LABEL: @test_vshrq_n_s16_trivial(
232 // CHECK-NEXT:  entry:
233 // CHECK-NEXT:    [[TMP0:%.*]] = ashr <8 x i16> [[A:%.*]], <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
234 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
235 //
test_vshrq_n_s16_trivial(int16x8_t a)236 int16x8_t test_vshrq_n_s16_trivial(int16x8_t a)
237 {
238 #ifdef POLYMORPHIC
239     return vshrq(a, 16);
240 #else /* POLYMORPHIC */
241     return vshrq_n_s16(a, 16);
242 #endif /* POLYMORPHIC */
243 }
244 
245 // CHECK-LABEL: @test_vshrq_n_s32_trivial(
246 // CHECK-NEXT:  entry:
247 // CHECK-NEXT:    [[TMP0:%.*]] = ashr <4 x i32> [[A:%.*]], <i32 31, i32 31, i32 31, i32 31>
248 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
249 //
test_vshrq_n_s32_trivial(int32x4_t a)250 int32x4_t test_vshrq_n_s32_trivial(int32x4_t a)
251 {
252 #ifdef POLYMORPHIC
253     return vshrq(a, 32);
254 #else /* POLYMORPHIC */
255     return vshrq_n_s32(a, 32);
256 #endif /* POLYMORPHIC */
257 }
258 
259 // CHECK-LABEL: @test_vshrq_n_u8(
260 // CHECK-NEXT:  entry:
261 // CHECK-NEXT:    [[TMP0:%.*]] = lshr <16 x i8> [[A:%.*]], <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
262 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
263 //
test_vshrq_n_u8(uint8x16_t a)264 uint8x16_t test_vshrq_n_u8(uint8x16_t a)
265 {
266 #ifdef POLYMORPHIC
267     return vshrq(a, 1);
268 #else /* POLYMORPHIC */
269     return vshrq_n_u8(a, 1);
270 #endif /* POLYMORPHIC */
271 }
272 
273 // CHECK-LABEL: @test_vshrq_n_u16(
274 // CHECK-NEXT:  entry:
275 // CHECK-NEXT:    [[TMP0:%.*]] = lshr <8 x i16> [[A:%.*]], <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
276 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
277 //
test_vshrq_n_u16(uint16x8_t a)278 uint16x8_t test_vshrq_n_u16(uint16x8_t a)
279 {
280 #ifdef POLYMORPHIC
281     return vshrq(a, 10);
282 #else /* POLYMORPHIC */
283     return vshrq_n_u16(a, 10);
284 #endif /* POLYMORPHIC */
285 }
286 
287 // CHECK-LABEL: @test_vshrq_n_u32(
288 // CHECK-NEXT:  entry:
289 // CHECK-NEXT:    [[TMP0:%.*]] = lshr <4 x i32> [[A:%.*]], <i32 10, i32 10, i32 10, i32 10>
290 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
291 //
test_vshrq_n_u32(uint32x4_t a)292 uint32x4_t test_vshrq_n_u32(uint32x4_t a)
293 {
294 #ifdef POLYMORPHIC
295     return vshrq(a, 10);
296 #else /* POLYMORPHIC */
297     return vshrq_n_u32(a, 10);
298 #endif /* POLYMORPHIC */
299 }
300 
301 // CHECK-LABEL: @test_vshrq_n_u8_trivial(
302 // CHECK-NEXT:  entry:
303 // CHECK-NEXT:    ret <16 x i8> zeroinitializer
304 //
test_vshrq_n_u8_trivial(uint8x16_t a)305 uint8x16_t test_vshrq_n_u8_trivial(uint8x16_t a)
306 {
307 #ifdef POLYMORPHIC
308     return vshrq(a, 8);
309 #else /* POLYMORPHIC */
310     return vshrq_n_u8(a, 8);
311 #endif /* POLYMORPHIC */
312 }
313 
314 // CHECK-LABEL: @test_vshrq_n_u16_trivial(
315 // CHECK-NEXT:  entry:
316 // CHECK-NEXT:    ret <8 x i16> zeroinitializer
317 //
test_vshrq_n_u16_trivial(uint16x8_t a)318 uint16x8_t test_vshrq_n_u16_trivial(uint16x8_t a)
319 {
320 #ifdef POLYMORPHIC
321     return vshrq(a, 16);
322 #else /* POLYMORPHIC */
323     return vshrq_n_u16(a, 16);
324 #endif /* POLYMORPHIC */
325 }
326 
327 // CHECK-LABEL: @test_vshrq_n_u32_trivial(
328 // CHECK-NEXT:  entry:
329 // CHECK-NEXT:    ret <4 x i32> zeroinitializer
330 //
test_vshrq_n_u32_trivial(uint32x4_t a)331 uint32x4_t test_vshrq_n_u32_trivial(uint32x4_t a)
332 {
333 #ifdef POLYMORPHIC
334     return vshrq(a, 32);
335 #else /* POLYMORPHIC */
336     return vshrq_n_u32(a, 32);
337 #endif /* POLYMORPHIC */
338 }
339 
340 // CHECK-LABEL: @test_vshlq_m_n_s8(
341 // CHECK-NEXT:  entry:
342 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
343 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
344 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.shl.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 6, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
345 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
346 //
test_vshlq_m_n_s8(int8x16_t inactive,int8x16_t a,mve_pred16_t p)347 int8x16_t test_vshlq_m_n_s8(int8x16_t inactive, int8x16_t a, mve_pred16_t p)
348 {
349 #ifdef POLYMORPHIC
350     return vshlq_m_n(inactive, a, 6, p);
351 #else /* POLYMORPHIC */
352     return vshlq_m_n_s8(inactive, a, 6, p);
353 #endif /* POLYMORPHIC */
354 }
355 
356 // CHECK-LABEL: @test_vshlq_m_n_s16(
357 // CHECK-NEXT:  entry:
358 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
359 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
360 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.shl.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 13, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
361 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
362 //
test_vshlq_m_n_s16(int16x8_t inactive,int16x8_t a,mve_pred16_t p)363 int16x8_t test_vshlq_m_n_s16(int16x8_t inactive, int16x8_t a, mve_pred16_t p)
364 {
365 #ifdef POLYMORPHIC
366     return vshlq_m_n(inactive, a, 13, p);
367 #else /* POLYMORPHIC */
368     return vshlq_m_n_s16(inactive, a, 13, p);
369 #endif /* POLYMORPHIC */
370 }
371 
372 // CHECK-LABEL: @test_vshlq_m_n_s32(
373 // CHECK-NEXT:  entry:
374 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
375 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
376 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.shl.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
377 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
378 //
test_vshlq_m_n_s32(int32x4_t inactive,int32x4_t a,mve_pred16_t p)379 int32x4_t test_vshlq_m_n_s32(int32x4_t inactive, int32x4_t a, mve_pred16_t p)
380 {
381 #ifdef POLYMORPHIC
382     return vshlq_m_n(inactive, a, 0, p);
383 #else /* POLYMORPHIC */
384     return vshlq_m_n_s32(inactive, a, 0, p);
385 #endif /* POLYMORPHIC */
386 }
387 
388 // CHECK-LABEL: @test_vshlq_m_n_u8(
389 // CHECK-NEXT:  entry:
390 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
391 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
392 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.shl.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 3, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
393 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
394 //
test_vshlq_m_n_u8(uint8x16_t inactive,uint8x16_t a,mve_pred16_t p)395 uint8x16_t test_vshlq_m_n_u8(uint8x16_t inactive, uint8x16_t a, mve_pred16_t p)
396 {
397 #ifdef POLYMORPHIC
398     return vshlq_m_n(inactive, a, 3, p);
399 #else /* POLYMORPHIC */
400     return vshlq_m_n_u8(inactive, a, 3, p);
401 #endif /* POLYMORPHIC */
402 }
403 
404 // CHECK-LABEL: @test_vshlq_m_n_u16(
405 // CHECK-NEXT:  entry:
406 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
407 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
408 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.shl.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
409 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
410 //
test_vshlq_m_n_u16(uint16x8_t inactive,uint16x8_t a,mve_pred16_t p)411 uint16x8_t test_vshlq_m_n_u16(uint16x8_t inactive, uint16x8_t a, mve_pred16_t p)
412 {
413 #ifdef POLYMORPHIC
414     return vshlq_m_n(inactive, a, 1, p);
415 #else /* POLYMORPHIC */
416     return vshlq_m_n_u16(inactive, a, 1, p);
417 #endif /* POLYMORPHIC */
418 }
419 
420 // CHECK-LABEL: @test_vshlq_m_n_u32(
421 // CHECK-NEXT:  entry:
422 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
423 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
424 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.shl.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 24, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
425 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
426 //
test_vshlq_m_n_u32(uint32x4_t inactive,uint32x4_t a,mve_pred16_t p)427 uint32x4_t test_vshlq_m_n_u32(uint32x4_t inactive, uint32x4_t a, mve_pred16_t p)
428 {
429 #ifdef POLYMORPHIC
430     return vshlq_m_n(inactive, a, 24, p);
431 #else /* POLYMORPHIC */
432     return vshlq_m_n_u32(inactive, a, 24, p);
433 #endif /* POLYMORPHIC */
434 }
435 
436 // CHECK-LABEL: @test_vshrq_m_n_s8(
437 // CHECK-NEXT:  entry:
438 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
439 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
440 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.shr.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 2, i32 0, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
441 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
442 //
test_vshrq_m_n_s8(int8x16_t inactive,int8x16_t a,mve_pred16_t p)443 int8x16_t test_vshrq_m_n_s8(int8x16_t inactive, int8x16_t a, mve_pred16_t p)
444 {
445 #ifdef POLYMORPHIC
446     return vshrq_m(inactive, a, 2, p);
447 #else /* POLYMORPHIC */
448     return vshrq_m_n_s8(inactive, a, 2, p);
449 #endif /* POLYMORPHIC */
450 }
451 
452 // CHECK-LABEL: @test_vshrq_m_n_s16(
453 // CHECK-NEXT:  entry:
454 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
455 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
456 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.shr.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 3, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
457 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
458 //
test_vshrq_m_n_s16(int16x8_t inactive,int16x8_t a,mve_pred16_t p)459 int16x8_t test_vshrq_m_n_s16(int16x8_t inactive, int16x8_t a, mve_pred16_t p)
460 {
461 #ifdef POLYMORPHIC
462     return vshrq_m(inactive, a, 3, p);
463 #else /* POLYMORPHIC */
464     return vshrq_m_n_s16(inactive, a, 3, p);
465 #endif /* POLYMORPHIC */
466 }
467 
468 // CHECK-LABEL: @test_vshrq_m_n_s32(
469 // CHECK-NEXT:  entry:
470 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
471 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
472 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.shr.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 13, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
473 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
474 //
test_vshrq_m_n_s32(int32x4_t inactive,int32x4_t a,mve_pred16_t p)475 int32x4_t test_vshrq_m_n_s32(int32x4_t inactive, int32x4_t a, mve_pred16_t p)
476 {
477 #ifdef POLYMORPHIC
478     return vshrq_m(inactive, a, 13, p);
479 #else /* POLYMORPHIC */
480     return vshrq_m_n_s32(inactive, a, 13, p);
481 #endif /* POLYMORPHIC */
482 }
483 
484 // CHECK-LABEL: @test_vshrq_m_n_u8(
485 // CHECK-NEXT:  entry:
486 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
487 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
488 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.shr.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 4, i32 1, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
489 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
490 //
test_vshrq_m_n_u8(uint8x16_t inactive,uint8x16_t a,mve_pred16_t p)491 uint8x16_t test_vshrq_m_n_u8(uint8x16_t inactive, uint8x16_t a, mve_pred16_t p)
492 {
493 #ifdef POLYMORPHIC
494     return vshrq_m(inactive, a, 4, p);
495 #else /* POLYMORPHIC */
496     return vshrq_m_n_u8(inactive, a, 4, p);
497 #endif /* POLYMORPHIC */
498 }
499 
500 // CHECK-LABEL: @test_vshrq_m_n_u16(
501 // CHECK-NEXT:  entry:
502 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
503 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
504 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.shr.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 14, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
505 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
506 //
test_vshrq_m_n_u16(uint16x8_t inactive,uint16x8_t a,mve_pred16_t p)507 uint16x8_t test_vshrq_m_n_u16(uint16x8_t inactive, uint16x8_t a, mve_pred16_t p)
508 {
509 #ifdef POLYMORPHIC
510     return vshrq_m(inactive, a, 14, p);
511 #else /* POLYMORPHIC */
512     return vshrq_m_n_u16(inactive, a, 14, p);
513 #endif /* POLYMORPHIC */
514 }
515 
516 // CHECK-LABEL: @test_vshrq_m_n_u32(
517 // CHECK-NEXT:  entry:
518 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
519 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
520 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.shr.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 21, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
521 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
522 //
test_vshrq_m_n_u32(uint32x4_t inactive,uint32x4_t a,mve_pred16_t p)523 uint32x4_t test_vshrq_m_n_u32(uint32x4_t inactive, uint32x4_t a, mve_pred16_t p)
524 {
525 #ifdef POLYMORPHIC
526     return vshrq_m(inactive, a, 21, p);
527 #else /* POLYMORPHIC */
528     return vshrq_m_n_u32(inactive, a, 21, p);
529 #endif /* POLYMORPHIC */
530 }
531 
532 // CHECK-LABEL: @test_vshlq_x_n_s8(
533 // CHECK-NEXT:  entry:
534 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
535 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
536 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.shl.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 1, <16 x i1> [[TMP1]], <16 x i8> undef)
537 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
538 //
test_vshlq_x_n_s8(int8x16_t a,mve_pred16_t p)539 int8x16_t test_vshlq_x_n_s8(int8x16_t a, mve_pred16_t p)
540 {
541 #ifdef POLYMORPHIC
542     return vshlq_x_n(a, 1, p);
543 #else /* POLYMORPHIC */
544     return vshlq_x_n_s8(a, 1, p);
545 #endif /* POLYMORPHIC */
546 }
547 
548 // CHECK-LABEL: @test_vshlq_x_n_s16(
549 // CHECK-NEXT:  entry:
550 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
551 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
552 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.shl.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 15, <8 x i1> [[TMP1]], <8 x i16> undef)
553 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
554 //
test_vshlq_x_n_s16(int16x8_t a,mve_pred16_t p)555 int16x8_t test_vshlq_x_n_s16(int16x8_t a, mve_pred16_t p)
556 {
557 #ifdef POLYMORPHIC
558     return vshlq_x_n(a, 15, p);
559 #else /* POLYMORPHIC */
560     return vshlq_x_n_s16(a, 15, p);
561 #endif /* POLYMORPHIC */
562 }
563 
564 // CHECK-LABEL: @test_vshlq_x_n_s32(
565 // CHECK-NEXT:  entry:
566 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
567 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
568 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.shl.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 13, <4 x i1> [[TMP1]], <4 x i32> undef)
569 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
570 //
test_vshlq_x_n_s32(int32x4_t a,mve_pred16_t p)571 int32x4_t test_vshlq_x_n_s32(int32x4_t a, mve_pred16_t p)
572 {
573 #ifdef POLYMORPHIC
574     return vshlq_x_n(a, 13, p);
575 #else /* POLYMORPHIC */
576     return vshlq_x_n_s32(a, 13, p);
577 #endif /* POLYMORPHIC */
578 }
579 
580 // CHECK-LABEL: @test_vshlq_x_n_u8(
581 // CHECK-NEXT:  entry:
582 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
583 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
584 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.shl.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 4, <16 x i1> [[TMP1]], <16 x i8> undef)
585 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
586 //
test_vshlq_x_n_u8(uint8x16_t a,mve_pred16_t p)587 uint8x16_t test_vshlq_x_n_u8(uint8x16_t a, mve_pred16_t p)
588 {
589 #ifdef POLYMORPHIC
590     return vshlq_x_n(a, 4, p);
591 #else /* POLYMORPHIC */
592     return vshlq_x_n_u8(a, 4, p);
593 #endif /* POLYMORPHIC */
594 }
595 
596 // CHECK-LABEL: @test_vshlq_x_n_u16(
597 // CHECK-NEXT:  entry:
598 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
599 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
600 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.shl.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 10, <8 x i1> [[TMP1]], <8 x i16> undef)
601 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
602 //
test_vshlq_x_n_u16(uint16x8_t a,mve_pred16_t p)603 uint16x8_t test_vshlq_x_n_u16(uint16x8_t a, mve_pred16_t p)
604 {
605 #ifdef POLYMORPHIC
606     return vshlq_x_n(a, 10, p);
607 #else /* POLYMORPHIC */
608     return vshlq_x_n_u16(a, 10, p);
609 #endif /* POLYMORPHIC */
610 }
611 
612 // CHECK-LABEL: @test_vshlq_x_n_u32(
613 // CHECK-NEXT:  entry:
614 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
615 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
616 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.shl.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 30, <4 x i1> [[TMP1]], <4 x i32> undef)
617 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
618 //
test_vshlq_x_n_u32(uint32x4_t a,mve_pred16_t p)619 uint32x4_t test_vshlq_x_n_u32(uint32x4_t a, mve_pred16_t p)
620 {
621 #ifdef POLYMORPHIC
622     return vshlq_x_n(a, 30, p);
623 #else /* POLYMORPHIC */
624     return vshlq_x_n_u32(a, 30, p);
625 #endif /* POLYMORPHIC */
626 }
627 
628 // CHECK-LABEL: @test_vshrq_x_n_s8(
629 // CHECK-NEXT:  entry:
630 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
631 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
632 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.shr.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 4, i32 0, <16 x i1> [[TMP1]], <16 x i8> undef)
633 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
634 //
test_vshrq_x_n_s8(int8x16_t a,mve_pred16_t p)635 int8x16_t test_vshrq_x_n_s8(int8x16_t a, mve_pred16_t p)
636 {
637 #ifdef POLYMORPHIC
638     return vshrq_x(a, 4, p);
639 #else /* POLYMORPHIC */
640     return vshrq_x_n_s8(a, 4, p);
641 #endif /* POLYMORPHIC */
642 }
643 
644 // CHECK-LABEL: @test_vshrq_x_n_s16(
645 // CHECK-NEXT:  entry:
646 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
647 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
648 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.shr.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 10, i32 0, <8 x i1> [[TMP1]], <8 x i16> undef)
649 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
650 //
test_vshrq_x_n_s16(int16x8_t a,mve_pred16_t p)651 int16x8_t test_vshrq_x_n_s16(int16x8_t a, mve_pred16_t p)
652 {
653 #ifdef POLYMORPHIC
654     return vshrq_x(a, 10, p);
655 #else /* POLYMORPHIC */
656     return vshrq_x_n_s16(a, 10, p);
657 #endif /* POLYMORPHIC */
658 }
659 
660 // CHECK-LABEL: @test_vshrq_x_n_s32(
661 // CHECK-NEXT:  entry:
662 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
663 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
664 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.shr.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 7, i32 0, <4 x i1> [[TMP1]], <4 x i32> undef)
665 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
666 //
test_vshrq_x_n_s32(int32x4_t a,mve_pred16_t p)667 int32x4_t test_vshrq_x_n_s32(int32x4_t a, mve_pred16_t p)
668 {
669 #ifdef POLYMORPHIC
670     return vshrq_x(a, 7, p);
671 #else /* POLYMORPHIC */
672     return vshrq_x_n_s32(a, 7, p);
673 #endif /* POLYMORPHIC */
674 }
675 
676 // CHECK-LABEL: @test_vshrq_x_n_u8(
677 // CHECK-NEXT:  entry:
678 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
679 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
680 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.shr.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 7, i32 1, <16 x i1> [[TMP1]], <16 x i8> undef)
681 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
682 //
test_vshrq_x_n_u8(uint8x16_t a,mve_pred16_t p)683 uint8x16_t test_vshrq_x_n_u8(uint8x16_t a, mve_pred16_t p)
684 {
685 #ifdef POLYMORPHIC
686     return vshrq_x(a, 7, p);
687 #else /* POLYMORPHIC */
688     return vshrq_x_n_u8(a, 7, p);
689 #endif /* POLYMORPHIC */
690 }
691 
692 // CHECK-LABEL: @test_vshrq_x_n_u16(
693 // CHECK-NEXT:  entry:
694 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
695 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
696 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.shr.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 7, i32 1, <8 x i1> [[TMP1]], <8 x i16> undef)
697 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
698 //
test_vshrq_x_n_u16(uint16x8_t a,mve_pred16_t p)699 uint16x8_t test_vshrq_x_n_u16(uint16x8_t a, mve_pred16_t p)
700 {
701 #ifdef POLYMORPHIC
702     return vshrq_x(a, 7, p);
703 #else /* POLYMORPHIC */
704     return vshrq_x_n_u16(a, 7, p);
705 #endif /* POLYMORPHIC */
706 }
707 
708 // CHECK-LABEL: @test_vshrq_x_n_u32(
709 // CHECK-NEXT:  entry:
710 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
711 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
712 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.shr.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 6, i32 1, <4 x i1> [[TMP1]], <4 x i32> undef)
713 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
714 //
test_vshrq_x_n_u32(uint32x4_t a,mve_pred16_t p)715 uint32x4_t test_vshrq_x_n_u32(uint32x4_t a, mve_pred16_t p)
716 {
717 #ifdef POLYMORPHIC
718     return vshrq_x(a, 6, p);
719 #else /* POLYMORPHIC */
720     return vshrq_x_n_u32(a, 6, p);
721 #endif /* POLYMORPHIC */
722 }
723 
724 // CHECK-LABEL: @test_vqshlq_n_s8(
725 // CHECK-NEXT:  entry:
726 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vqshl.imm.v16i8(<16 x i8> [[A:%.*]], i32 3, i32 0)
727 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
728 //
test_vqshlq_n_s8(int8x16_t a)729 int8x16_t test_vqshlq_n_s8(int8x16_t a)
730 {
731 #ifdef POLYMORPHIC
732     return vqshlq_n(a, 3);
733 #else /* POLYMORPHIC */
734     return vqshlq_n_s8(a, 3);
735 #endif /* POLYMORPHIC */
736 }
737 
738 // CHECK-LABEL: @test_vqshlq_n_s16(
739 // CHECK-NEXT:  entry:
740 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vqshl.imm.v8i16(<8 x i16> [[A:%.*]], i32 4, i32 0)
741 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
742 //
test_vqshlq_n_s16(int16x8_t a)743 int16x8_t test_vqshlq_n_s16(int16x8_t a)
744 {
745 #ifdef POLYMORPHIC
746     return vqshlq_n(a, 4);
747 #else /* POLYMORPHIC */
748     return vqshlq_n_s16(a, 4);
749 #endif /* POLYMORPHIC */
750 }
751 
752 // CHECK-LABEL: @test_vqshlq_n_s32(
753 // CHECK-NEXT:  entry:
754 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vqshl.imm.v4i32(<4 x i32> [[A:%.*]], i32 4, i32 0)
755 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
756 //
test_vqshlq_n_s32(int32x4_t a)757 int32x4_t test_vqshlq_n_s32(int32x4_t a)
758 {
759 #ifdef POLYMORPHIC
760     return vqshlq_n(a, 4);
761 #else /* POLYMORPHIC */
762     return vqshlq_n_s32(a, 4);
763 #endif /* POLYMORPHIC */
764 }
765 
766 // CHECK-LABEL: @test_vqshlq_n_u8(
767 // CHECK-NEXT:  entry:
768 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vqshl.imm.v16i8(<16 x i8> [[A:%.*]], i32 0, i32 1)
769 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
770 //
test_vqshlq_n_u8(uint8x16_t a)771 uint8x16_t test_vqshlq_n_u8(uint8x16_t a)
772 {
773 #ifdef POLYMORPHIC
774     return vqshlq_n(a, 0);
775 #else /* POLYMORPHIC */
776     return vqshlq_n_u8(a, 0);
777 #endif /* POLYMORPHIC */
778 }
779 
780 // CHECK-LABEL: @test_vqshlq_n_u16(
781 // CHECK-NEXT:  entry:
782 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vqshl.imm.v8i16(<8 x i16> [[A:%.*]], i32 13, i32 1)
783 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
784 //
test_vqshlq_n_u16(uint16x8_t a)785 uint16x8_t test_vqshlq_n_u16(uint16x8_t a)
786 {
787 #ifdef POLYMORPHIC
788     return vqshlq_n(a, 13);
789 #else /* POLYMORPHIC */
790     return vqshlq_n_u16(a, 13);
791 #endif /* POLYMORPHIC */
792 }
793 
794 // CHECK-LABEL: @test_vqshlq_n_u32(
795 // CHECK-NEXT:  entry:
796 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vqshl.imm.v4i32(<4 x i32> [[A:%.*]], i32 6, i32 1)
797 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
798 //
test_vqshlq_n_u32(uint32x4_t a)799 uint32x4_t test_vqshlq_n_u32(uint32x4_t a)
800 {
801 #ifdef POLYMORPHIC
802     return vqshlq_n(a, 6);
803 #else /* POLYMORPHIC */
804     return vqshlq_n_u32(a, 6);
805 #endif /* POLYMORPHIC */
806 }
807 
808 // CHECK-LABEL: @test_vqshluq_n_s8(
809 // CHECK-NEXT:  entry:
810 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vqshlu.imm.v16i8(<16 x i8> [[A:%.*]], i32 5)
811 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
812 //
test_vqshluq_n_s8(int8x16_t a)813 uint8x16_t test_vqshluq_n_s8(int8x16_t a)
814 {
815 #ifdef POLYMORPHIC
816     return vqshluq(a, 5);
817 #else /* POLYMORPHIC */
818     return vqshluq_n_s8(a, 5);
819 #endif /* POLYMORPHIC */
820 }
821 
822 // CHECK-LABEL: @test_vqshluq_n_s16(
823 // CHECK-NEXT:  entry:
824 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vqshlu.imm.v8i16(<8 x i16> [[A:%.*]], i32 5)
825 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
826 //
test_vqshluq_n_s16(int16x8_t a)827 uint16x8_t test_vqshluq_n_s16(int16x8_t a)
828 {
829 #ifdef POLYMORPHIC
830     return vqshluq(a, 5);
831 #else /* POLYMORPHIC */
832     return vqshluq_n_s16(a, 5);
833 #endif /* POLYMORPHIC */
834 }
835 
836 // CHECK-LABEL: @test_vqshluq_n_s32(
837 // CHECK-NEXT:  entry:
838 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vqshlu.imm.v4i32(<4 x i32> [[A:%.*]], i32 4)
839 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
840 //
test_vqshluq_n_s32(int32x4_t a)841 uint32x4_t test_vqshluq_n_s32(int32x4_t a)
842 {
843 #ifdef POLYMORPHIC
844     return vqshluq(a, 4);
845 #else /* POLYMORPHIC */
846     return vqshluq_n_s32(a, 4);
847 #endif /* POLYMORPHIC */
848 }
849 
850 // CHECK-LABEL: @test_vrshrq_n_s8(
851 // CHECK-NEXT:  entry:
852 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vrshr.imm.v16i8(<16 x i8> [[A:%.*]], i32 4, i32 0)
853 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
854 //
test_vrshrq_n_s8(int8x16_t a)855 int8x16_t test_vrshrq_n_s8(int8x16_t a)
856 {
857 #ifdef POLYMORPHIC
858     return vrshrq(a, 4);
859 #else /* POLYMORPHIC */
860     return vrshrq_n_s8(a, 4);
861 #endif /* POLYMORPHIC */
862 }
863 
864 // CHECK-LABEL: @test_vrshrq_n_s16(
865 // CHECK-NEXT:  entry:
866 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vrshr.imm.v8i16(<8 x i16> [[A:%.*]], i32 12, i32 0)
867 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
868 //
test_vrshrq_n_s16(int16x8_t a)869 int16x8_t test_vrshrq_n_s16(int16x8_t a)
870 {
871 #ifdef POLYMORPHIC
872     return vrshrq(a, 12);
873 #else /* POLYMORPHIC */
874     return vrshrq_n_s16(a, 12);
875 #endif /* POLYMORPHIC */
876 }
877 
878 // CHECK-LABEL: @test_vrshrq_n_s32(
879 // CHECK-NEXT:  entry:
880 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vrshr.imm.v4i32(<4 x i32> [[A:%.*]], i32 30, i32 0)
881 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
882 //
test_vrshrq_n_s32(int32x4_t a)883 int32x4_t test_vrshrq_n_s32(int32x4_t a)
884 {
885 #ifdef POLYMORPHIC
886     return vrshrq(a, 30);
887 #else /* POLYMORPHIC */
888     return vrshrq_n_s32(a, 30);
889 #endif /* POLYMORPHIC */
890 }
891 
892 // CHECK-LABEL: @test_vrshrq_n_u8(
893 // CHECK-NEXT:  entry:
894 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vrshr.imm.v16i8(<16 x i8> [[A:%.*]], i32 1, i32 1)
895 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
896 //
test_vrshrq_n_u8(uint8x16_t a)897 uint8x16_t test_vrshrq_n_u8(uint8x16_t a)
898 {
899 #ifdef POLYMORPHIC
900     return vrshrq(a, 1);
901 #else /* POLYMORPHIC */
902     return vrshrq_n_u8(a, 1);
903 #endif /* POLYMORPHIC */
904 }
905 
906 // CHECK-LABEL: @test_vrshrq_n_u16(
907 // CHECK-NEXT:  entry:
908 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vrshr.imm.v8i16(<8 x i16> [[A:%.*]], i32 15, i32 1)
909 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
910 //
test_vrshrq_n_u16(uint16x8_t a)911 uint16x8_t test_vrshrq_n_u16(uint16x8_t a)
912 {
913 #ifdef POLYMORPHIC
914     return vrshrq(a, 15);
915 #else /* POLYMORPHIC */
916     return vrshrq_n_u16(a, 15);
917 #endif /* POLYMORPHIC */
918 }
919 
920 // CHECK-LABEL: @test_vrshrq_n_u32(
921 // CHECK-NEXT:  entry:
922 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vrshr.imm.v4i32(<4 x i32> [[A:%.*]], i32 20, i32 1)
923 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
924 //
test_vrshrq_n_u32(uint32x4_t a)925 uint32x4_t test_vrshrq_n_u32(uint32x4_t a)
926 {
927 #ifdef POLYMORPHIC
928     return vrshrq(a, 20);
929 #else /* POLYMORPHIC */
930     return vrshrq_n_u32(a, 20);
931 #endif /* POLYMORPHIC */
932 }
933 
934 // CHECK-LABEL: @test_vqshlq_m_n_s8(
935 // CHECK-NEXT:  entry:
936 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
937 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
938 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vqshl.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 6, i32 0, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
939 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
940 //
test_vqshlq_m_n_s8(int8x16_t inactive,int8x16_t a,mve_pred16_t p)941 int8x16_t test_vqshlq_m_n_s8(int8x16_t inactive, int8x16_t a, mve_pred16_t p)
942 {
943 #ifdef POLYMORPHIC
944     return vqshlq_m_n(inactive, a, 6, p);
945 #else /* POLYMORPHIC */
946     return vqshlq_m_n_s8(inactive, a, 6, p);
947 #endif /* POLYMORPHIC */
948 }
949 
950 // CHECK-LABEL: @test_vqshlq_m_n_s16(
951 // CHECK-NEXT:  entry:
952 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
953 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
954 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vqshl.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 13, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
955 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
956 //
test_vqshlq_m_n_s16(int16x8_t inactive,int16x8_t a,mve_pred16_t p)957 int16x8_t test_vqshlq_m_n_s16(int16x8_t inactive, int16x8_t a, mve_pred16_t p)
958 {
959 #ifdef POLYMORPHIC
960     return vqshlq_m_n(inactive, a, 13, p);
961 #else /* POLYMORPHIC */
962     return vqshlq_m_n_s16(inactive, a, 13, p);
963 #endif /* POLYMORPHIC */
964 }
965 
966 // CHECK-LABEL: @test_vqshlq_m_n_s32(
967 // CHECK-NEXT:  entry:
968 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
969 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
970 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vqshl.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 14, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
971 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
972 //
test_vqshlq_m_n_s32(int32x4_t inactive,int32x4_t a,mve_pred16_t p)973 int32x4_t test_vqshlq_m_n_s32(int32x4_t inactive, int32x4_t a, mve_pred16_t p)
974 {
975 #ifdef POLYMORPHIC
976     return vqshlq_m_n(inactive, a, 14, p);
977 #else /* POLYMORPHIC */
978     return vqshlq_m_n_s32(inactive, a, 14, p);
979 #endif /* POLYMORPHIC */
980 }
981 
982 // CHECK-LABEL: @test_vqshlq_m_n_u8(
983 // CHECK-NEXT:  entry:
984 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
985 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
986 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vqshl.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 4, i32 1, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
987 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
988 //
test_vqshlq_m_n_u8(uint8x16_t inactive,uint8x16_t a,mve_pred16_t p)989 uint8x16_t test_vqshlq_m_n_u8(uint8x16_t inactive, uint8x16_t a, mve_pred16_t p)
990 {
991 #ifdef POLYMORPHIC
992     return vqshlq_m_n(inactive, a, 4, p);
993 #else /* POLYMORPHIC */
994     return vqshlq_m_n_u8(inactive, a, 4, p);
995 #endif /* POLYMORPHIC */
996 }
997 
998 // CHECK-LABEL: @test_vqshlq_m_n_u16(
999 // CHECK-NEXT:  entry:
1000 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1001 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1002 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vqshl.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 9, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1003 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1004 //
test_vqshlq_m_n_u16(uint16x8_t inactive,uint16x8_t a,mve_pred16_t p)1005 uint16x8_t test_vqshlq_m_n_u16(uint16x8_t inactive, uint16x8_t a, mve_pred16_t p)
1006 {
1007 #ifdef POLYMORPHIC
1008     return vqshlq_m_n(inactive, a, 9, p);
1009 #else /* POLYMORPHIC */
1010     return vqshlq_m_n_u16(inactive, a, 9, p);
1011 #endif /* POLYMORPHIC */
1012 }
1013 
1014 // CHECK-LABEL: @test_vqshlq_m_n_u32(
1015 // CHECK-NEXT:  entry:
1016 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1017 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1018 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vqshl.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 25, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1019 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1020 //
test_vqshlq_m_n_u32(uint32x4_t inactive,uint32x4_t a,mve_pred16_t p)1021 uint32x4_t test_vqshlq_m_n_u32(uint32x4_t inactive, uint32x4_t a, mve_pred16_t p)
1022 {
1023 #ifdef POLYMORPHIC
1024     return vqshlq_m_n(inactive, a, 25, p);
1025 #else /* POLYMORPHIC */
1026     return vqshlq_m_n_u32(inactive, a, 25, p);
1027 #endif /* POLYMORPHIC */
1028 }
1029 
1030 // CHECK-LABEL: @test_vqshluq_m_n_s8(
1031 // CHECK-NEXT:  entry:
1032 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1033 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1034 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vqshlu.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 2, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
1035 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1036 //
test_vqshluq_m_n_s8(uint8x16_t inactive,int8x16_t a,mve_pred16_t p)1037 uint8x16_t test_vqshluq_m_n_s8(uint8x16_t inactive, int8x16_t a, mve_pred16_t p)
1038 {
1039 #ifdef POLYMORPHIC
1040     return vqshluq_m(inactive, a, 2, p);
1041 #else /* POLYMORPHIC */
1042     return vqshluq_m_n_s8(inactive, a, 2, p);
1043 #endif /* POLYMORPHIC */
1044 }
1045 
1046 // CHECK-LABEL: @test_vqshluq_m_n_s16(
1047 // CHECK-NEXT:  entry:
1048 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1049 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1050 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vqshlu.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 12, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1051 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1052 //
test_vqshluq_m_n_s16(uint16x8_t inactive,int16x8_t a,mve_pred16_t p)1053 uint16x8_t test_vqshluq_m_n_s16(uint16x8_t inactive, int16x8_t a, mve_pred16_t p)
1054 {
1055 #ifdef POLYMORPHIC
1056     return vqshluq_m(inactive, a, 12, p);
1057 #else /* POLYMORPHIC */
1058     return vqshluq_m_n_s16(inactive, a, 12, p);
1059 #endif /* POLYMORPHIC */
1060 }
1061 
1062 // CHECK-LABEL: @test_vqshluq_m_n_s32(
1063 // CHECK-NEXT:  entry:
1064 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1065 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1066 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vqshlu.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 24, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1067 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1068 //
test_vqshluq_m_n_s32(uint32x4_t inactive,int32x4_t a,mve_pred16_t p)1069 uint32x4_t test_vqshluq_m_n_s32(uint32x4_t inactive, int32x4_t a, mve_pred16_t p)
1070 {
1071 #ifdef POLYMORPHIC
1072     return vqshluq_m(inactive, a, 24, p);
1073 #else /* POLYMORPHIC */
1074     return vqshluq_m_n_s32(inactive, a, 24, p);
1075 #endif /* POLYMORPHIC */
1076 }
1077 
1078 // CHECK-LABEL: @test_vrshrq_m_n_s8(
1079 // CHECK-NEXT:  entry:
1080 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1081 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1082 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vrshr.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 2, i32 0, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
1083 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1084 //
test_vrshrq_m_n_s8(int8x16_t inactive,int8x16_t a,mve_pred16_t p)1085 int8x16_t test_vrshrq_m_n_s8(int8x16_t inactive, int8x16_t a, mve_pred16_t p)
1086 {
1087 #ifdef POLYMORPHIC
1088     return vrshrq_m(inactive, a, 2, p);
1089 #else /* POLYMORPHIC */
1090     return vrshrq_m_n_s8(inactive, a, 2, p);
1091 #endif /* POLYMORPHIC */
1092 }
1093 
1094 // CHECK-LABEL: @test_vrshrq_m_n_s16(
1095 // CHECK-NEXT:  entry:
1096 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1097 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1098 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vrshr.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 11, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1099 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1100 //
test_vrshrq_m_n_s16(int16x8_t inactive,int16x8_t a,mve_pred16_t p)1101 int16x8_t test_vrshrq_m_n_s16(int16x8_t inactive, int16x8_t a, mve_pred16_t p)
1102 {
1103 #ifdef POLYMORPHIC
1104     return vrshrq_m(inactive, a, 11, p);
1105 #else /* POLYMORPHIC */
1106     return vrshrq_m_n_s16(inactive, a, 11, p);
1107 #endif /* POLYMORPHIC */
1108 }
1109 
1110 // CHECK-LABEL: @test_vrshrq_m_n_s32(
1111 // CHECK-NEXT:  entry:
1112 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1113 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1114 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vrshr.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 24, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1115 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1116 //
test_vrshrq_m_n_s32(int32x4_t inactive,int32x4_t a,mve_pred16_t p)1117 int32x4_t test_vrshrq_m_n_s32(int32x4_t inactive, int32x4_t a, mve_pred16_t p)
1118 {
1119 #ifdef POLYMORPHIC
1120     return vrshrq_m(inactive, a, 24, p);
1121 #else /* POLYMORPHIC */
1122     return vrshrq_m_n_s32(inactive, a, 24, p);
1123 #endif /* POLYMORPHIC */
1124 }
1125 
1126 // CHECK-LABEL: @test_vrshrq_m_n_u8(
1127 // CHECK-NEXT:  entry:
1128 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1129 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1130 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vrshr.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 7, i32 1, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
1131 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1132 //
test_vrshrq_m_n_u8(uint8x16_t inactive,uint8x16_t a,mve_pred16_t p)1133 uint8x16_t test_vrshrq_m_n_u8(uint8x16_t inactive, uint8x16_t a, mve_pred16_t p)
1134 {
1135 #ifdef POLYMORPHIC
1136     return vrshrq_m(inactive, a, 7, p);
1137 #else /* POLYMORPHIC */
1138     return vrshrq_m_n_u8(inactive, a, 7, p);
1139 #endif /* POLYMORPHIC */
1140 }
1141 
1142 // CHECK-LABEL: @test_vrshrq_m_n_u16(
1143 // CHECK-NEXT:  entry:
1144 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1145 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1146 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vrshr.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 4, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1147 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1148 //
test_vrshrq_m_n_u16(uint16x8_t inactive,uint16x8_t a,mve_pred16_t p)1149 uint16x8_t test_vrshrq_m_n_u16(uint16x8_t inactive, uint16x8_t a, mve_pred16_t p)
1150 {
1151 #ifdef POLYMORPHIC
1152     return vrshrq_m(inactive, a, 4, p);
1153 #else /* POLYMORPHIC */
1154     return vrshrq_m_n_u16(inactive, a, 4, p);
1155 #endif /* POLYMORPHIC */
1156 }
1157 
1158 // CHECK-LABEL: @test_vrshrq_m_n_u32(
1159 // CHECK-NEXT:  entry:
1160 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1161 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1162 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vrshr.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 27, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1163 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1164 //
test_vrshrq_m_n_u32(uint32x4_t inactive,uint32x4_t a,mve_pred16_t p)1165 uint32x4_t test_vrshrq_m_n_u32(uint32x4_t inactive, uint32x4_t a, mve_pred16_t p)
1166 {
1167 #ifdef POLYMORPHIC
1168     return vrshrq_m(inactive, a, 27, p);
1169 #else /* POLYMORPHIC */
1170     return vrshrq_m_n_u32(inactive, a, 27, p);
1171 #endif /* POLYMORPHIC */
1172 }
1173 
1174 // CHECK-LABEL: @test_vrshrq_x_n_s8(
1175 // CHECK-NEXT:  entry:
1176 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1177 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1178 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vrshr.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 3, i32 0, <16 x i1> [[TMP1]], <16 x i8> undef)
1179 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1180 //
test_vrshrq_x_n_s8(int8x16_t a,mve_pred16_t p)1181 int8x16_t test_vrshrq_x_n_s8(int8x16_t a, mve_pred16_t p)
1182 {
1183 #ifdef POLYMORPHIC
1184     return vrshrq_x(a, 3, p);
1185 #else /* POLYMORPHIC */
1186     return vrshrq_x_n_s8(a, 3, p);
1187 #endif /* POLYMORPHIC */
1188 }
1189 
1190 // CHECK-LABEL: @test_vrshrq_x_n_s16(
1191 // CHECK-NEXT:  entry:
1192 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1193 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1194 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vrshr.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 12, i32 0, <8 x i1> [[TMP1]], <8 x i16> undef)
1195 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1196 //
test_vrshrq_x_n_s16(int16x8_t a,mve_pred16_t p)1197 int16x8_t test_vrshrq_x_n_s16(int16x8_t a, mve_pred16_t p)
1198 {
1199 #ifdef POLYMORPHIC
1200     return vrshrq_x(a, 12, p);
1201 #else /* POLYMORPHIC */
1202     return vrshrq_x_n_s16(a, 12, p);
1203 #endif /* POLYMORPHIC */
1204 }
1205 
1206 // CHECK-LABEL: @test_vrshrq_x_n_s32(
1207 // CHECK-NEXT:  entry:
1208 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1209 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1210 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vrshr.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 20, i32 0, <4 x i1> [[TMP1]], <4 x i32> undef)
1211 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1212 //
test_vrshrq_x_n_s32(int32x4_t a,mve_pred16_t p)1213 int32x4_t test_vrshrq_x_n_s32(int32x4_t a, mve_pred16_t p)
1214 {
1215 #ifdef POLYMORPHIC
1216     return vrshrq_x(a, 20, p);
1217 #else /* POLYMORPHIC */
1218     return vrshrq_x_n_s32(a, 20, p);
1219 #endif /* POLYMORPHIC */
1220 }
1221 
1222 // CHECK-LABEL: @test_vrshrq_x_n_u8(
1223 // CHECK-NEXT:  entry:
1224 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1225 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1226 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vrshr.imm.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 1, i32 1, <16 x i1> [[TMP1]], <16 x i8> undef)
1227 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1228 //
test_vrshrq_x_n_u8(uint8x16_t a,mve_pred16_t p)1229 uint8x16_t test_vrshrq_x_n_u8(uint8x16_t a, mve_pred16_t p)
1230 {
1231 #ifdef POLYMORPHIC
1232     return vrshrq_x(a, 1, p);
1233 #else /* POLYMORPHIC */
1234     return vrshrq_x_n_u8(a, 1, p);
1235 #endif /* POLYMORPHIC */
1236 }
1237 
1238 // CHECK-LABEL: @test_vrshrq_x_n_u16(
1239 // CHECK-NEXT:  entry:
1240 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1241 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1242 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vrshr.imm.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 13, i32 1, <8 x i1> [[TMP1]], <8 x i16> undef)
1243 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1244 //
test_vrshrq_x_n_u16(uint16x8_t a,mve_pred16_t p)1245 uint16x8_t test_vrshrq_x_n_u16(uint16x8_t a, mve_pred16_t p)
1246 {
1247 #ifdef POLYMORPHIC
1248     return vrshrq_x(a, 13, p);
1249 #else /* POLYMORPHIC */
1250     return vrshrq_x_n_u16(a, 13, p);
1251 #endif /* POLYMORPHIC */
1252 }
1253 
1254 // CHECK-LABEL: @test_vrshrq_x_n_u32(
1255 // CHECK-NEXT:  entry:
1256 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1257 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1258 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vrshr.imm.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 6, i32 1, <4 x i1> [[TMP1]], <4 x i32> undef)
1259 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1260 //
test_vrshrq_x_n_u32(uint32x4_t a,mve_pred16_t p)1261 uint32x4_t test_vrshrq_x_n_u32(uint32x4_t a, mve_pred16_t p)
1262 {
1263 #ifdef POLYMORPHIC
1264     return vrshrq_x(a, 6, p);
1265 #else /* POLYMORPHIC */
1266     return vrshrq_x_n_u32(a, 6, p);
1267 #endif /* POLYMORPHIC */
1268 }
1269 
1270 // CHECK-LABEL: @test_vshllbq_n_s8(
1271 // CHECK-NEXT:  entry:
1272 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.v8i16.v16i8(<16 x i8> [[A:%.*]], i32 2, i32 0, i32 0)
1273 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
1274 //
test_vshllbq_n_s8(int8x16_t a)1275 int16x8_t test_vshllbq_n_s8(int8x16_t a)
1276 {
1277 #ifdef POLYMORPHIC
1278     return vshllbq(a, 2);
1279 #else /* POLYMORPHIC */
1280     return vshllbq_n_s8(a, 2);
1281 #endif /* POLYMORPHIC */
1282 }
1283 
1284 // CHECK-LABEL: @test_vshllbq_n_s16(
1285 // CHECK-NEXT:  entry:
1286 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.v4i32.v8i16(<8 x i16> [[A:%.*]], i32 13, i32 0, i32 0)
1287 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
1288 //
test_vshllbq_n_s16(int16x8_t a)1289 int32x4_t test_vshllbq_n_s16(int16x8_t a)
1290 {
1291 #ifdef POLYMORPHIC
1292     return vshllbq(a, 13);
1293 #else /* POLYMORPHIC */
1294     return vshllbq_n_s16(a, 13);
1295 #endif /* POLYMORPHIC */
1296 }
1297 
1298 // CHECK-LABEL: @test_vshllbq_n_u8(
1299 // CHECK-NEXT:  entry:
1300 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.v8i16.v16i8(<16 x i8> [[A:%.*]], i32 5, i32 1, i32 0)
1301 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
1302 //
test_vshllbq_n_u8(uint8x16_t a)1303 uint16x8_t test_vshllbq_n_u8(uint8x16_t a)
1304 {
1305 #ifdef POLYMORPHIC
1306     return vshllbq(a, 5);
1307 #else /* POLYMORPHIC */
1308     return vshllbq_n_u8(a, 5);
1309 #endif /* POLYMORPHIC */
1310 }
1311 
1312 // CHECK-LABEL: @test_vshllbq_n_u16(
1313 // CHECK-NEXT:  entry:
1314 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.v4i32.v8i16(<8 x i16> [[A:%.*]], i32 6, i32 1, i32 0)
1315 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
1316 //
test_vshllbq_n_u16(uint16x8_t a)1317 uint32x4_t test_vshllbq_n_u16(uint16x8_t a)
1318 {
1319 #ifdef POLYMORPHIC
1320     return vshllbq(a, 6);
1321 #else /* POLYMORPHIC */
1322     return vshllbq_n_u16(a, 6);
1323 #endif /* POLYMORPHIC */
1324 }
1325 
1326 // CHECK-LABEL: @test_vshlltq_n_s8(
1327 // CHECK-NEXT:  entry:
1328 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.v8i16.v16i8(<16 x i8> [[A:%.*]], i32 7, i32 0, i32 1)
1329 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
1330 //
test_vshlltq_n_s8(int8x16_t a)1331 int16x8_t test_vshlltq_n_s8(int8x16_t a)
1332 {
1333 #ifdef POLYMORPHIC
1334     return vshlltq(a, 7);
1335 #else /* POLYMORPHIC */
1336     return vshlltq_n_s8(a, 7);
1337 #endif /* POLYMORPHIC */
1338 }
1339 
1340 // CHECK-LABEL: @test_vshlltq_n_s16(
1341 // CHECK-NEXT:  entry:
1342 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.v4i32.v8i16(<8 x i16> [[A:%.*]], i32 2, i32 0, i32 1)
1343 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
1344 //
test_vshlltq_n_s16(int16x8_t a)1345 int32x4_t test_vshlltq_n_s16(int16x8_t a)
1346 {
1347 #ifdef POLYMORPHIC
1348     return vshlltq(a, 2);
1349 #else /* POLYMORPHIC */
1350     return vshlltq_n_s16(a, 2);
1351 #endif /* POLYMORPHIC */
1352 }
1353 
1354 // CHECK-LABEL: @test_vshlltq_n_u8(
1355 // CHECK-NEXT:  entry:
1356 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.v8i16.v16i8(<16 x i8> [[A:%.*]], i32 7, i32 1, i32 1)
1357 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
1358 //
test_vshlltq_n_u8(uint8x16_t a)1359 uint16x8_t test_vshlltq_n_u8(uint8x16_t a)
1360 {
1361 #ifdef POLYMORPHIC
1362     return vshlltq(a, 7);
1363 #else /* POLYMORPHIC */
1364     return vshlltq_n_u8(a, 7);
1365 #endif /* POLYMORPHIC */
1366 }
1367 
1368 // CHECK-LABEL: @test_vshlltq_n_u16(
1369 // CHECK-NEXT:  entry:
1370 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.v4i32.v8i16(<8 x i16> [[A:%.*]], i32 14, i32 1, i32 1)
1371 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
1372 //
test_vshlltq_n_u16(uint16x8_t a)1373 uint32x4_t test_vshlltq_n_u16(uint16x8_t a)
1374 {
1375 #ifdef POLYMORPHIC
1376     return vshlltq(a, 14);
1377 #else /* POLYMORPHIC */
1378     return vshlltq_n_u16(a, 14);
1379 #endif /* POLYMORPHIC */
1380 }
1381 
1382 // CHECK-LABEL: @test_vshllbq_m_n_s8(
1383 // CHECK-NEXT:  entry:
1384 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1385 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1386 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.predicated.v8i16.v16i8.v8i1(<16 x i8> [[A:%.*]], i32 6, i32 0, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1387 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1388 //
test_vshllbq_m_n_s8(int16x8_t inactive,int8x16_t a,mve_pred16_t p)1389 int16x8_t test_vshllbq_m_n_s8(int16x8_t inactive, int8x16_t a, mve_pred16_t p)
1390 {
1391 #ifdef POLYMORPHIC
1392     return vshllbq_m(inactive, a, 6, p);
1393 #else /* POLYMORPHIC */
1394     return vshllbq_m_n_s8(inactive, a, 6, p);
1395 #endif /* POLYMORPHIC */
1396 }
1397 
1398 // CHECK-LABEL: @test_vshllbq_m_n_s16(
1399 // CHECK-NEXT:  entry:
1400 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1401 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1402 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.predicated.v4i32.v8i16.v4i1(<8 x i16> [[A:%.*]], i32 10, i32 0, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1403 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1404 //
test_vshllbq_m_n_s16(int32x4_t inactive,int16x8_t a,mve_pred16_t p)1405 int32x4_t test_vshllbq_m_n_s16(int32x4_t inactive, int16x8_t a, mve_pred16_t p)
1406 {
1407 #ifdef POLYMORPHIC
1408     return vshllbq_m(inactive, a, 10, p);
1409 #else /* POLYMORPHIC */
1410     return vshllbq_m_n_s16(inactive, a, 10, p);
1411 #endif /* POLYMORPHIC */
1412 }
1413 
1414 // CHECK-LABEL: @test_vshllbq_m_n_u8(
1415 // CHECK-NEXT:  entry:
1416 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1417 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1418 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.predicated.v8i16.v16i8.v8i1(<16 x i8> [[A:%.*]], i32 3, i32 1, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1419 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1420 //
test_vshllbq_m_n_u8(uint16x8_t inactive,uint8x16_t a,mve_pred16_t p)1421 uint16x8_t test_vshllbq_m_n_u8(uint16x8_t inactive, uint8x16_t a, mve_pred16_t p)
1422 {
1423 #ifdef POLYMORPHIC
1424     return vshllbq_m(inactive, a, 3, p);
1425 #else /* POLYMORPHIC */
1426     return vshllbq_m_n_u8(inactive, a, 3, p);
1427 #endif /* POLYMORPHIC */
1428 }
1429 
1430 // CHECK-LABEL: @test_vshllbq_m_n_u16(
1431 // CHECK-NEXT:  entry:
1432 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1433 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1434 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.predicated.v4i32.v8i16.v4i1(<8 x i16> [[A:%.*]], i32 14, i32 1, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1435 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1436 //
test_vshllbq_m_n_u16(uint32x4_t inactive,uint16x8_t a,mve_pred16_t p)1437 uint32x4_t test_vshllbq_m_n_u16(uint32x4_t inactive, uint16x8_t a, mve_pred16_t p)
1438 {
1439 #ifdef POLYMORPHIC
1440     return vshllbq_m(inactive, a, 14, p);
1441 #else /* POLYMORPHIC */
1442     return vshllbq_m_n_u16(inactive, a, 14, p);
1443 #endif /* POLYMORPHIC */
1444 }
1445 
1446 // CHECK-LABEL: @test_vshlltq_m_n_s8(
1447 // CHECK-NEXT:  entry:
1448 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1449 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1450 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.predicated.v8i16.v16i8.v8i1(<16 x i8> [[A:%.*]], i32 4, i32 0, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1451 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1452 //
test_vshlltq_m_n_s8(int16x8_t inactive,int8x16_t a,mve_pred16_t p)1453 int16x8_t test_vshlltq_m_n_s8(int16x8_t inactive, int8x16_t a, mve_pred16_t p)
1454 {
1455 #ifdef POLYMORPHIC
1456     return vshlltq_m(inactive, a, 4, p);
1457 #else /* POLYMORPHIC */
1458     return vshlltq_m_n_s8(inactive, a, 4, p);
1459 #endif /* POLYMORPHIC */
1460 }
1461 
1462 // CHECK-LABEL: @test_vshlltq_m_n_s16(
1463 // CHECK-NEXT:  entry:
1464 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1465 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1466 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.predicated.v4i32.v8i16.v4i1(<8 x i16> [[A:%.*]], i32 12, i32 0, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1467 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1468 //
test_vshlltq_m_n_s16(int32x4_t inactive,int16x8_t a,mve_pred16_t p)1469 int32x4_t test_vshlltq_m_n_s16(int32x4_t inactive, int16x8_t a, mve_pred16_t p)
1470 {
1471 #ifdef POLYMORPHIC
1472     return vshlltq_m(inactive, a, 12, p);
1473 #else /* POLYMORPHIC */
1474     return vshlltq_m_n_s16(inactive, a, 12, p);
1475 #endif /* POLYMORPHIC */
1476 }
1477 
1478 // CHECK-LABEL: @test_vshlltq_m_n_u8(
1479 // CHECK-NEXT:  entry:
1480 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1481 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1482 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.predicated.v8i16.v16i8.v8i1(<16 x i8> [[A:%.*]], i32 2, i32 1, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1483 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1484 //
test_vshlltq_m_n_u8(uint16x8_t inactive,uint8x16_t a,mve_pred16_t p)1485 uint16x8_t test_vshlltq_m_n_u8(uint16x8_t inactive, uint8x16_t a, mve_pred16_t p)
1486 {
1487 #ifdef POLYMORPHIC
1488     return vshlltq_m(inactive, a, 2, p);
1489 #else /* POLYMORPHIC */
1490     return vshlltq_m_n_u8(inactive, a, 2, p);
1491 #endif /* POLYMORPHIC */
1492 }
1493 
1494 // CHECK-LABEL: @test_vshlltq_m_n_u16(
1495 // CHECK-NEXT:  entry:
1496 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1497 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1498 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.predicated.v4i32.v8i16.v4i1(<8 x i16> [[A:%.*]], i32 9, i32 1, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1499 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1500 //
test_vshlltq_m_n_u16(uint32x4_t inactive,uint16x8_t a,mve_pred16_t p)1501 uint32x4_t test_vshlltq_m_n_u16(uint32x4_t inactive, uint16x8_t a, mve_pred16_t p)
1502 {
1503 #ifdef POLYMORPHIC
1504     return vshlltq_m(inactive, a, 9, p);
1505 #else /* POLYMORPHIC */
1506     return vshlltq_m_n_u16(inactive, a, 9, p);
1507 #endif /* POLYMORPHIC */
1508 }
1509 
1510 // CHECK-LABEL: @test_vshllbq_x_n_s8(
1511 // CHECK-NEXT:  entry:
1512 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1513 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1514 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.predicated.v8i16.v16i8.v8i1(<16 x i8> [[A:%.*]], i32 1, i32 0, i32 0, <8 x i1> [[TMP1]], <8 x i16> undef)
1515 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1516 //
test_vshllbq_x_n_s8(int8x16_t a,mve_pred16_t p)1517 int16x8_t test_vshllbq_x_n_s8(int8x16_t a, mve_pred16_t p)
1518 {
1519 #ifdef POLYMORPHIC
1520     return vshllbq_x(a, 1, p);
1521 #else /* POLYMORPHIC */
1522     return vshllbq_x_n_s8(a, 1, p);
1523 #endif /* POLYMORPHIC */
1524 }
1525 
1526 // CHECK-LABEL: @test_vshllbq_x_n_s16(
1527 // CHECK-NEXT:  entry:
1528 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1529 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1530 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.predicated.v4i32.v8i16.v4i1(<8 x i16> [[A:%.*]], i32 10, i32 0, i32 0, <4 x i1> [[TMP1]], <4 x i32> undef)
1531 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1532 //
test_vshllbq_x_n_s16(int16x8_t a,mve_pred16_t p)1533 int32x4_t test_vshllbq_x_n_s16(int16x8_t a, mve_pred16_t p)
1534 {
1535 #ifdef POLYMORPHIC
1536     return vshllbq_x(a, 10, p);
1537 #else /* POLYMORPHIC */
1538     return vshllbq_x_n_s16(a, 10, p);
1539 #endif /* POLYMORPHIC */
1540 }
1541 
1542 // CHECK-LABEL: @test_vshllbq_x_n_u8(
1543 // CHECK-NEXT:  entry:
1544 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1545 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1546 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.predicated.v8i16.v16i8.v8i1(<16 x i8> [[A:%.*]], i32 6, i32 1, i32 0, <8 x i1> [[TMP1]], <8 x i16> undef)
1547 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1548 //
test_vshllbq_x_n_u8(uint8x16_t a,mve_pred16_t p)1549 uint16x8_t test_vshllbq_x_n_u8(uint8x16_t a, mve_pred16_t p)
1550 {
1551 #ifdef POLYMORPHIC
1552     return vshllbq_x(a, 6, p);
1553 #else /* POLYMORPHIC */
1554     return vshllbq_x_n_u8(a, 6, p);
1555 #endif /* POLYMORPHIC */
1556 }
1557 
1558 // CHECK-LABEL: @test_vshllbq_x_n_u16(
1559 // CHECK-NEXT:  entry:
1560 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1561 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1562 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.predicated.v4i32.v8i16.v4i1(<8 x i16> [[A:%.*]], i32 10, i32 1, i32 0, <4 x i1> [[TMP1]], <4 x i32> undef)
1563 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1564 //
test_vshllbq_x_n_u16(uint16x8_t a,mve_pred16_t p)1565 uint32x4_t test_vshllbq_x_n_u16(uint16x8_t a, mve_pred16_t p)
1566 {
1567 #ifdef POLYMORPHIC
1568     return vshllbq_x(a, 10, p);
1569 #else /* POLYMORPHIC */
1570     return vshllbq_x_n_u16(a, 10, p);
1571 #endif /* POLYMORPHIC */
1572 }
1573 
1574 // CHECK-LABEL: @test_vshlltq_x_n_s8(
1575 // CHECK-NEXT:  entry:
1576 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1577 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1578 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.predicated.v8i16.v16i8.v8i1(<16 x i8> [[A:%.*]], i32 2, i32 0, i32 1, <8 x i1> [[TMP1]], <8 x i16> undef)
1579 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1580 //
test_vshlltq_x_n_s8(int8x16_t a,mve_pred16_t p)1581 int16x8_t test_vshlltq_x_n_s8(int8x16_t a, mve_pred16_t p)
1582 {
1583 #ifdef POLYMORPHIC
1584     return vshlltq_x(a, 2, p);
1585 #else /* POLYMORPHIC */
1586     return vshlltq_x_n_s8(a, 2, p);
1587 #endif /* POLYMORPHIC */
1588 }
1589 
1590 // CHECK-LABEL: @test_vshlltq_x_n_s16(
1591 // CHECK-NEXT:  entry:
1592 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1593 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1594 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.predicated.v4i32.v8i16.v4i1(<8 x i16> [[A:%.*]], i32 6, i32 0, i32 1, <4 x i1> [[TMP1]], <4 x i32> undef)
1595 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1596 //
test_vshlltq_x_n_s16(int16x8_t a,mve_pred16_t p)1597 int32x4_t test_vshlltq_x_n_s16(int16x8_t a, mve_pred16_t p)
1598 {
1599 #ifdef POLYMORPHIC
1600     return vshlltq_x(a, 6, p);
1601 #else /* POLYMORPHIC */
1602     return vshlltq_x_n_s16(a, 6, p);
1603 #endif /* POLYMORPHIC */
1604 }
1605 
1606 // CHECK-LABEL: @test_vshlltq_x_n_u8(
1607 // CHECK-NEXT:  entry:
1608 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1609 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1610 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshll.imm.predicated.v8i16.v16i8.v8i1(<16 x i8> [[A:%.*]], i32 5, i32 1, i32 1, <8 x i1> [[TMP1]], <8 x i16> undef)
1611 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1612 //
test_vshlltq_x_n_u8(uint8x16_t a,mve_pred16_t p)1613 uint16x8_t test_vshlltq_x_n_u8(uint8x16_t a, mve_pred16_t p)
1614 {
1615 #ifdef POLYMORPHIC
1616     return vshlltq_x(a, 5, p);
1617 #else /* POLYMORPHIC */
1618     return vshlltq_x_n_u8(a, 5, p);
1619 #endif /* POLYMORPHIC */
1620 }
1621 
1622 // CHECK-LABEL: @test_vshlltq_x_n_u16(
1623 // CHECK-NEXT:  entry:
1624 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1625 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1626 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshll.imm.predicated.v4i32.v8i16.v4i1(<8 x i16> [[A:%.*]], i32 3, i32 1, i32 1, <4 x i1> [[TMP1]], <4 x i32> undef)
1627 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1628 //
test_vshlltq_x_n_u16(uint16x8_t a,mve_pred16_t p)1629 uint32x4_t test_vshlltq_x_n_u16(uint16x8_t a, mve_pred16_t p)
1630 {
1631 #ifdef POLYMORPHIC
1632     return vshlltq_x(a, 3, p);
1633 #else /* POLYMORPHIC */
1634     return vshlltq_x_n_u16(a, 3, p);
1635 #endif /* POLYMORPHIC */
1636 }
1637 
1638