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 -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 -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_s8(
8 // CHECK-NEXT:  entry:
9 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.v16i8.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 0, i32 0)
10 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
11 //
test_vshlq_s8(int8x16_t a,int8x16_t b)12 int8x16_t test_vshlq_s8(int8x16_t a, int8x16_t b)
13 {
14 #ifdef POLYMORPHIC
15     return vshlq(a, b);
16 #else /* POLYMORPHIC */
17     return vshlq_s8(a, b);
18 #endif /* POLYMORPHIC */
19 }
20 
21 // CHECK-LABEL: @test_vshlq_s16(
22 // CHECK-NEXT:  entry:
23 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.v8i16.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 0, i32 0)
24 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
25 //
test_vshlq_s16(int16x8_t a,int16x8_t b)26 int16x8_t test_vshlq_s16(int16x8_t a, int16x8_t b)
27 {
28 #ifdef POLYMORPHIC
29     return vshlq(a, b);
30 #else /* POLYMORPHIC */
31     return vshlq_s16(a, b);
32 #endif /* POLYMORPHIC */
33 }
34 
35 // CHECK-LABEL: @test_vshlq_s32(
36 // CHECK-NEXT:  entry:
37 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.v4i32.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 0, i32 0)
38 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
39 //
test_vshlq_s32(int32x4_t a,int32x4_t b)40 int32x4_t test_vshlq_s32(int32x4_t a, int32x4_t b)
41 {
42 #ifdef POLYMORPHIC
43     return vshlq(a, b);
44 #else /* POLYMORPHIC */
45     return vshlq_s32(a, b);
46 #endif /* POLYMORPHIC */
47 }
48 
49 // CHECK-LABEL: @test_vshlq_u8(
50 // CHECK-NEXT:  entry:
51 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.v16i8.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 0, i32 1)
52 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
53 //
test_vshlq_u8(uint8x16_t a,int8x16_t b)54 uint8x16_t test_vshlq_u8(uint8x16_t a, int8x16_t b)
55 {
56 #ifdef POLYMORPHIC
57     return vshlq(a, b);
58 #else /* POLYMORPHIC */
59     return vshlq_u8(a, b);
60 #endif /* POLYMORPHIC */
61 }
62 
63 // CHECK-LABEL: @test_vshlq_u16(
64 // CHECK-NEXT:  entry:
65 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.v8i16.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 0, i32 1)
66 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
67 //
test_vshlq_u16(uint16x8_t a,int16x8_t b)68 uint16x8_t test_vshlq_u16(uint16x8_t a, int16x8_t b)
69 {
70 #ifdef POLYMORPHIC
71     return vshlq(a, b);
72 #else /* POLYMORPHIC */
73     return vshlq_u16(a, b);
74 #endif /* POLYMORPHIC */
75 }
76 
77 // CHECK-LABEL: @test_vshlq_u32(
78 // CHECK-NEXT:  entry:
79 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.v4i32.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 0, i32 1)
80 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
81 //
test_vshlq_u32(uint32x4_t a,int32x4_t b)82 uint32x4_t test_vshlq_u32(uint32x4_t a, int32x4_t b)
83 {
84 #ifdef POLYMORPHIC
85     return vshlq(a, b);
86 #else /* POLYMORPHIC */
87     return vshlq_u32(a, b);
88 #endif /* POLYMORPHIC */
89 }
90 
91 // CHECK-LABEL: @test_vshlq_r_s8(
92 // CHECK-NEXT:  entry:
93 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.v16i8(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 0)
94 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
95 //
test_vshlq_r_s8(int8x16_t a,int32_t b)96 int8x16_t test_vshlq_r_s8(int8x16_t a, int32_t b)
97 {
98 #ifdef POLYMORPHIC
99     return vshlq_r(a, b);
100 #else /* POLYMORPHIC */
101     return vshlq_r_s8(a, b);
102 #endif /* POLYMORPHIC */
103 }
104 
105 // CHECK-LABEL: @test_vshlq_r_s16(
106 // CHECK-NEXT:  entry:
107 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.v8i16(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 0)
108 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
109 //
test_vshlq_r_s16(int16x8_t a,int32_t b)110 int16x8_t test_vshlq_r_s16(int16x8_t a, int32_t b)
111 {
112 #ifdef POLYMORPHIC
113     return vshlq_r(a, b);
114 #else /* POLYMORPHIC */
115     return vshlq_r_s16(a, b);
116 #endif /* POLYMORPHIC */
117 }
118 
119 // CHECK-LABEL: @test_vshlq_r_s32(
120 // CHECK-NEXT:  entry:
121 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.v4i32(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 0)
122 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
123 //
test_vshlq_r_s32(int32x4_t a,int32_t b)124 int32x4_t test_vshlq_r_s32(int32x4_t a, int32_t b)
125 {
126 #ifdef POLYMORPHIC
127     return vshlq_r(a, b);
128 #else /* POLYMORPHIC */
129     return vshlq_r_s32(a, b);
130 #endif /* POLYMORPHIC */
131 }
132 
133 // CHECK-LABEL: @test_vshlq_r_u8(
134 // CHECK-NEXT:  entry:
135 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.v16i8(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 1)
136 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
137 //
test_vshlq_r_u8(uint8x16_t a,int32_t b)138 uint8x16_t test_vshlq_r_u8(uint8x16_t a, int32_t b)
139 {
140 #ifdef POLYMORPHIC
141     return vshlq_r(a, b);
142 #else /* POLYMORPHIC */
143     return vshlq_r_u8(a, b);
144 #endif /* POLYMORPHIC */
145 }
146 
147 // CHECK-LABEL: @test_vshlq_r_u16(
148 // CHECK-NEXT:  entry:
149 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.v8i16(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 1)
150 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
151 //
test_vshlq_r_u16(uint16x8_t a,int32_t b)152 uint16x8_t test_vshlq_r_u16(uint16x8_t a, int32_t b)
153 {
154 #ifdef POLYMORPHIC
155     return vshlq_r(a, b);
156 #else /* POLYMORPHIC */
157     return vshlq_r_u16(a, b);
158 #endif /* POLYMORPHIC */
159 }
160 
161 // CHECK-LABEL: @test_vshlq_r_u32(
162 // CHECK-NEXT:  entry:
163 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.v4i32(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 1)
164 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
165 //
test_vshlq_r_u32(uint32x4_t a,int32_t b)166 uint32x4_t test_vshlq_r_u32(uint32x4_t a, int32_t b)
167 {
168 #ifdef POLYMORPHIC
169     return vshlq_r(a, b);
170 #else /* POLYMORPHIC */
171     return vshlq_r_u32(a, b);
172 #endif /* POLYMORPHIC */
173 }
174 
175 // CHECK-LABEL: @test_vqshlq_s8(
176 // CHECK-NEXT:  entry:
177 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.v16i8.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 1, i32 0, i32 0)
178 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
179 //
test_vqshlq_s8(int8x16_t a,int8x16_t b)180 int8x16_t test_vqshlq_s8(int8x16_t a, int8x16_t b)
181 {
182 #ifdef POLYMORPHIC
183     return vqshlq(a, b);
184 #else /* POLYMORPHIC */
185     return vqshlq_s8(a, b);
186 #endif /* POLYMORPHIC */
187 }
188 
189 // CHECK-LABEL: @test_vqshlq_s16(
190 // CHECK-NEXT:  entry:
191 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.v8i16.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, i32 0, i32 0)
192 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
193 //
test_vqshlq_s16(int16x8_t a,int16x8_t b)194 int16x8_t test_vqshlq_s16(int16x8_t a, int16x8_t b)
195 {
196 #ifdef POLYMORPHIC
197     return vqshlq(a, b);
198 #else /* POLYMORPHIC */
199     return vqshlq_s16(a, b);
200 #endif /* POLYMORPHIC */
201 }
202 
203 // CHECK-LABEL: @test_vqshlq_s32(
204 // CHECK-NEXT:  entry:
205 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.v4i32.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, i32 0, i32 0)
206 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
207 //
test_vqshlq_s32(int32x4_t a,int32x4_t b)208 int32x4_t test_vqshlq_s32(int32x4_t a, int32x4_t b)
209 {
210 #ifdef POLYMORPHIC
211     return vqshlq(a, b);
212 #else /* POLYMORPHIC */
213     return vqshlq_s32(a, b);
214 #endif /* POLYMORPHIC */
215 }
216 
217 // CHECK-LABEL: @test_vqshlq_u8(
218 // CHECK-NEXT:  entry:
219 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.v16i8.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 1, i32 0, i32 1)
220 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
221 //
test_vqshlq_u8(uint8x16_t a,int8x16_t b)222 uint8x16_t test_vqshlq_u8(uint8x16_t a, int8x16_t b)
223 {
224 #ifdef POLYMORPHIC
225     return vqshlq(a, b);
226 #else /* POLYMORPHIC */
227     return vqshlq_u8(a, b);
228 #endif /* POLYMORPHIC */
229 }
230 
231 // CHECK-LABEL: @test_vqshlq_u16(
232 // CHECK-NEXT:  entry:
233 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.v8i16.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, i32 0, i32 1)
234 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
235 //
test_vqshlq_u16(uint16x8_t a,int16x8_t b)236 uint16x8_t test_vqshlq_u16(uint16x8_t a, int16x8_t b)
237 {
238 #ifdef POLYMORPHIC
239     return vqshlq(a, b);
240 #else /* POLYMORPHIC */
241     return vqshlq_u16(a, b);
242 #endif /* POLYMORPHIC */
243 }
244 
245 // CHECK-LABEL: @test_vqshlq_u32(
246 // CHECK-NEXT:  entry:
247 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.v4i32.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, i32 0, i32 1)
248 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
249 //
test_vqshlq_u32(uint32x4_t a,int32x4_t b)250 uint32x4_t test_vqshlq_u32(uint32x4_t a, int32x4_t b)
251 {
252 #ifdef POLYMORPHIC
253     return vqshlq(a, b);
254 #else /* POLYMORPHIC */
255     return vqshlq_u32(a, b);
256 #endif /* POLYMORPHIC */
257 }
258 
259 // CHECK-LABEL: @test_vqshlq_r_s8(
260 // CHECK-NEXT:  entry:
261 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.v16i8(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 0)
262 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
263 //
test_vqshlq_r_s8(int8x16_t a,int32_t b)264 int8x16_t test_vqshlq_r_s8(int8x16_t a, int32_t b)
265 {
266 #ifdef POLYMORPHIC
267     return vqshlq_r(a, b);
268 #else /* POLYMORPHIC */
269     return vqshlq_r_s8(a, b);
270 #endif /* POLYMORPHIC */
271 }
272 
273 // CHECK-LABEL: @test_vqshlq_r_s16(
274 // CHECK-NEXT:  entry:
275 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.v8i16(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 0)
276 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
277 //
test_vqshlq_r_s16(int16x8_t a,int32_t b)278 int16x8_t test_vqshlq_r_s16(int16x8_t a, int32_t b)
279 {
280 #ifdef POLYMORPHIC
281     return vqshlq_r(a, b);
282 #else /* POLYMORPHIC */
283     return vqshlq_r_s16(a, b);
284 #endif /* POLYMORPHIC */
285 }
286 
287 // CHECK-LABEL: @test_vqshlq_r_s32(
288 // CHECK-NEXT:  entry:
289 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.v4i32(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 0)
290 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
291 //
test_vqshlq_r_s32(int32x4_t a,int32_t b)292 int32x4_t test_vqshlq_r_s32(int32x4_t a, int32_t b)
293 {
294 #ifdef POLYMORPHIC
295     return vqshlq_r(a, b);
296 #else /* POLYMORPHIC */
297     return vqshlq_r_s32(a, b);
298 #endif /* POLYMORPHIC */
299 }
300 
301 // CHECK-LABEL: @test_vqshlq_r_u8(
302 // CHECK-NEXT:  entry:
303 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.v16i8(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 1)
304 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
305 //
test_vqshlq_r_u8(uint8x16_t a,int32_t b)306 uint8x16_t test_vqshlq_r_u8(uint8x16_t a, int32_t b)
307 {
308 #ifdef POLYMORPHIC
309     return vqshlq_r(a, b);
310 #else /* POLYMORPHIC */
311     return vqshlq_r_u8(a, b);
312 #endif /* POLYMORPHIC */
313 }
314 
315 // CHECK-LABEL: @test_vqshlq_r_u16(
316 // CHECK-NEXT:  entry:
317 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.v8i16(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 1)
318 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
319 //
test_vqshlq_r_u16(uint16x8_t a,int32_t b)320 uint16x8_t test_vqshlq_r_u16(uint16x8_t a, int32_t b)
321 {
322 #ifdef POLYMORPHIC
323     return vqshlq_r(a, b);
324 #else /* POLYMORPHIC */
325     return vqshlq_r_u16(a, b);
326 #endif /* POLYMORPHIC */
327 }
328 
329 // CHECK-LABEL: @test_vqshlq_r_u32(
330 // CHECK-NEXT:  entry:
331 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.v4i32(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 1)
332 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
333 //
test_vqshlq_r_u32(uint32x4_t a,int32_t b)334 uint32x4_t test_vqshlq_r_u32(uint32x4_t a, int32_t b)
335 {
336 #ifdef POLYMORPHIC
337     return vqshlq_r(a, b);
338 #else /* POLYMORPHIC */
339     return vqshlq_r_u32(a, b);
340 #endif /* POLYMORPHIC */
341 }
342 
343 // CHECK-LABEL: @test_vrshlq_s8(
344 // CHECK-NEXT:  entry:
345 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.v16i8.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 1, i32 0)
346 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
347 //
test_vrshlq_s8(int8x16_t a,int8x16_t b)348 int8x16_t test_vrshlq_s8(int8x16_t a, int8x16_t b)
349 {
350 #ifdef POLYMORPHIC
351     return vrshlq(a, b);
352 #else /* POLYMORPHIC */
353     return vrshlq_s8(a, b);
354 #endif /* POLYMORPHIC */
355 }
356 
357 // CHECK-LABEL: @test_vrshlq_s16(
358 // CHECK-NEXT:  entry:
359 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.v8i16.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 1, i32 0)
360 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
361 //
test_vrshlq_s16(int16x8_t a,int16x8_t b)362 int16x8_t test_vrshlq_s16(int16x8_t a, int16x8_t b)
363 {
364 #ifdef POLYMORPHIC
365     return vrshlq(a, b);
366 #else /* POLYMORPHIC */
367     return vrshlq_s16(a, b);
368 #endif /* POLYMORPHIC */
369 }
370 
371 // CHECK-LABEL: @test_vrshlq_s32(
372 // CHECK-NEXT:  entry:
373 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.v4i32.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 1, i32 0)
374 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
375 //
test_vrshlq_s32(int32x4_t a,int32x4_t b)376 int32x4_t test_vrshlq_s32(int32x4_t a, int32x4_t b)
377 {
378 #ifdef POLYMORPHIC
379     return vrshlq(a, b);
380 #else /* POLYMORPHIC */
381     return vrshlq_s32(a, b);
382 #endif /* POLYMORPHIC */
383 }
384 
385 // CHECK-LABEL: @test_vrshlq_u8(
386 // CHECK-NEXT:  entry:
387 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.v16i8.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 1, i32 1)
388 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
389 //
test_vrshlq_u8(uint8x16_t a,int8x16_t b)390 uint8x16_t test_vrshlq_u8(uint8x16_t a, int8x16_t b)
391 {
392 #ifdef POLYMORPHIC
393     return vrshlq(a, b);
394 #else /* POLYMORPHIC */
395     return vrshlq_u8(a, b);
396 #endif /* POLYMORPHIC */
397 }
398 
399 // CHECK-LABEL: @test_vrshlq_u16(
400 // CHECK-NEXT:  entry:
401 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.v8i16.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 1, i32 1)
402 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
403 //
test_vrshlq_u16(uint16x8_t a,int16x8_t b)404 uint16x8_t test_vrshlq_u16(uint16x8_t a, int16x8_t b)
405 {
406 #ifdef POLYMORPHIC
407     return vrshlq(a, b);
408 #else /* POLYMORPHIC */
409     return vrshlq_u16(a, b);
410 #endif /* POLYMORPHIC */
411 }
412 
413 // CHECK-LABEL: @test_vrshlq_u32(
414 // CHECK-NEXT:  entry:
415 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.v4i32.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 1, i32 1)
416 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
417 //
test_vrshlq_u32(uint32x4_t a,int32x4_t b)418 uint32x4_t test_vrshlq_u32(uint32x4_t a, int32x4_t b)
419 {
420 #ifdef POLYMORPHIC
421     return vrshlq(a, b);
422 #else /* POLYMORPHIC */
423     return vrshlq_u32(a, b);
424 #endif /* POLYMORPHIC */
425 }
426 
427 // CHECK-LABEL: @test_vrshlq_n_s8(
428 // CHECK-NEXT:  entry:
429 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.v16i8(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 0)
430 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
431 //
test_vrshlq_n_s8(int8x16_t a,int32_t b)432 int8x16_t test_vrshlq_n_s8(int8x16_t a, int32_t b)
433 {
434 #ifdef POLYMORPHIC
435     return vrshlq(a, b);
436 #else /* POLYMORPHIC */
437     return vrshlq_n_s8(a, b);
438 #endif /* POLYMORPHIC */
439 }
440 
441 // CHECK-LABEL: @test_vrshlq_n_s16(
442 // CHECK-NEXT:  entry:
443 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.v8i16(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 0)
444 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
445 //
test_vrshlq_n_s16(int16x8_t a,int32_t b)446 int16x8_t test_vrshlq_n_s16(int16x8_t a, int32_t b)
447 {
448 #ifdef POLYMORPHIC
449     return vrshlq(a, b);
450 #else /* POLYMORPHIC */
451     return vrshlq_n_s16(a, b);
452 #endif /* POLYMORPHIC */
453 }
454 
455 // CHECK-LABEL: @test_vrshlq_n_s32(
456 // CHECK-NEXT:  entry:
457 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.v4i32(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 0)
458 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
459 //
test_vrshlq_n_s32(int32x4_t a,int32_t b)460 int32x4_t test_vrshlq_n_s32(int32x4_t a, int32_t b)
461 {
462 #ifdef POLYMORPHIC
463     return vrshlq(a, b);
464 #else /* POLYMORPHIC */
465     return vrshlq_n_s32(a, b);
466 #endif /* POLYMORPHIC */
467 }
468 
469 // CHECK-LABEL: @test_vrshlq_n_u8(
470 // CHECK-NEXT:  entry:
471 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.v16i8(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 1)
472 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
473 //
test_vrshlq_n_u8(uint8x16_t a,int32_t b)474 uint8x16_t test_vrshlq_n_u8(uint8x16_t a, int32_t b)
475 {
476 #ifdef POLYMORPHIC
477     return vrshlq(a, b);
478 #else /* POLYMORPHIC */
479     return vrshlq_n_u8(a, b);
480 #endif /* POLYMORPHIC */
481 }
482 
483 // CHECK-LABEL: @test_vrshlq_n_u16(
484 // CHECK-NEXT:  entry:
485 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.v8i16(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 1)
486 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
487 //
test_vrshlq_n_u16(uint16x8_t a,int32_t b)488 uint16x8_t test_vrshlq_n_u16(uint16x8_t a, int32_t b)
489 {
490 #ifdef POLYMORPHIC
491     return vrshlq(a, b);
492 #else /* POLYMORPHIC */
493     return vrshlq_n_u16(a, b);
494 #endif /* POLYMORPHIC */
495 }
496 
497 // CHECK-LABEL: @test_vrshlq_n_u32(
498 // CHECK-NEXT:  entry:
499 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.v4i32(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 1)
500 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
501 //
test_vrshlq_n_u32(uint32x4_t a,int32_t b)502 uint32x4_t test_vrshlq_n_u32(uint32x4_t a, int32_t b)
503 {
504 #ifdef POLYMORPHIC
505     return vrshlq(a, b);
506 #else /* POLYMORPHIC */
507     return vrshlq_n_u32(a, b);
508 #endif /* POLYMORPHIC */
509 }
510 
511 // CHECK-LABEL: @test_vqrshlq_s8(
512 // CHECK-NEXT:  entry:
513 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.v16i8.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 1, i32 1, i32 0)
514 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
515 //
test_vqrshlq_s8(int8x16_t a,int8x16_t b)516 int8x16_t test_vqrshlq_s8(int8x16_t a, int8x16_t b)
517 {
518 #ifdef POLYMORPHIC
519     return vqrshlq(a, b);
520 #else /* POLYMORPHIC */
521     return vqrshlq_s8(a, b);
522 #endif /* POLYMORPHIC */
523 }
524 
525 // CHECK-LABEL: @test_vqrshlq_s16(
526 // CHECK-NEXT:  entry:
527 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.v8i16.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, i32 1, i32 0)
528 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
529 //
test_vqrshlq_s16(int16x8_t a,int16x8_t b)530 int16x8_t test_vqrshlq_s16(int16x8_t a, int16x8_t b)
531 {
532 #ifdef POLYMORPHIC
533     return vqrshlq(a, b);
534 #else /* POLYMORPHIC */
535     return vqrshlq_s16(a, b);
536 #endif /* POLYMORPHIC */
537 }
538 
539 // CHECK-LABEL: @test_vqrshlq_s32(
540 // CHECK-NEXT:  entry:
541 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.v4i32.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, i32 1, i32 0)
542 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
543 //
test_vqrshlq_s32(int32x4_t a,int32x4_t b)544 int32x4_t test_vqrshlq_s32(int32x4_t a, int32x4_t b)
545 {
546 #ifdef POLYMORPHIC
547     return vqrshlq(a, b);
548 #else /* POLYMORPHIC */
549     return vqrshlq_s32(a, b);
550 #endif /* POLYMORPHIC */
551 }
552 
553 // CHECK-LABEL: @test_vqrshlq_u8(
554 // CHECK-NEXT:  entry:
555 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.v16i8.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 1, i32 1, i32 1)
556 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
557 //
test_vqrshlq_u8(uint8x16_t a,int8x16_t b)558 uint8x16_t test_vqrshlq_u8(uint8x16_t a, int8x16_t b)
559 {
560 #ifdef POLYMORPHIC
561     return vqrshlq(a, b);
562 #else /* POLYMORPHIC */
563     return vqrshlq_u8(a, b);
564 #endif /* POLYMORPHIC */
565 }
566 
567 // CHECK-LABEL: @test_vqrshlq_u16(
568 // CHECK-NEXT:  entry:
569 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.v8i16.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, i32 1, i32 1)
570 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
571 //
test_vqrshlq_u16(uint16x8_t a,int16x8_t b)572 uint16x8_t test_vqrshlq_u16(uint16x8_t a, int16x8_t b)
573 {
574 #ifdef POLYMORPHIC
575     return vqrshlq(a, b);
576 #else /* POLYMORPHIC */
577     return vqrshlq_u16(a, b);
578 #endif /* POLYMORPHIC */
579 }
580 
581 // CHECK-LABEL: @test_vqrshlq_u32(
582 // CHECK-NEXT:  entry:
583 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.v4i32.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, i32 1, i32 1)
584 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
585 //
test_vqrshlq_u32(uint32x4_t a,int32x4_t b)586 uint32x4_t test_vqrshlq_u32(uint32x4_t a, int32x4_t b)
587 {
588 #ifdef POLYMORPHIC
589     return vqrshlq(a, b);
590 #else /* POLYMORPHIC */
591     return vqrshlq_u32(a, b);
592 #endif /* POLYMORPHIC */
593 }
594 
595 // CHECK-LABEL: @test_vqrshlq_n_s8(
596 // CHECK-NEXT:  entry:
597 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.v16i8(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 0)
598 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
599 //
test_vqrshlq_n_s8(int8x16_t a,int32_t b)600 int8x16_t test_vqrshlq_n_s8(int8x16_t a, int32_t b)
601 {
602 #ifdef POLYMORPHIC
603     return vqrshlq(a, b);
604 #else /* POLYMORPHIC */
605     return vqrshlq_n_s8(a, b);
606 #endif /* POLYMORPHIC */
607 }
608 
609 // CHECK-LABEL: @test_vqrshlq_n_s16(
610 // CHECK-NEXT:  entry:
611 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.v8i16(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 0)
612 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
613 //
test_vqrshlq_n_s16(int16x8_t a,int32_t b)614 int16x8_t test_vqrshlq_n_s16(int16x8_t a, int32_t b)
615 {
616 #ifdef POLYMORPHIC
617     return vqrshlq(a, b);
618 #else /* POLYMORPHIC */
619     return vqrshlq_n_s16(a, b);
620 #endif /* POLYMORPHIC */
621 }
622 
623 // CHECK-LABEL: @test_vqrshlq_n_s32(
624 // CHECK-NEXT:  entry:
625 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.v4i32(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 0)
626 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
627 //
test_vqrshlq_n_s32(int32x4_t a,int32_t b)628 int32x4_t test_vqrshlq_n_s32(int32x4_t a, int32_t b)
629 {
630 #ifdef POLYMORPHIC
631     return vqrshlq(a, b);
632 #else /* POLYMORPHIC */
633     return vqrshlq_n_s32(a, b);
634 #endif /* POLYMORPHIC */
635 }
636 
637 // CHECK-LABEL: @test_vqrshlq_n_u8(
638 // CHECK-NEXT:  entry:
639 // CHECK-NEXT:    [[TMP0:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.v16i8(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 1)
640 // CHECK-NEXT:    ret <16 x i8> [[TMP0]]
641 //
test_vqrshlq_n_u8(uint8x16_t a,int32_t b)642 uint8x16_t test_vqrshlq_n_u8(uint8x16_t a, int32_t b)
643 {
644 #ifdef POLYMORPHIC
645     return vqrshlq(a, b);
646 #else /* POLYMORPHIC */
647     return vqrshlq_n_u8(a, b);
648 #endif /* POLYMORPHIC */
649 }
650 
651 // CHECK-LABEL: @test_vqrshlq_n_u16(
652 // CHECK-NEXT:  entry:
653 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.v8i16(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 1)
654 // CHECK-NEXT:    ret <8 x i16> [[TMP0]]
655 //
test_vqrshlq_n_u16(uint16x8_t a,int32_t b)656 uint16x8_t test_vqrshlq_n_u16(uint16x8_t a, int32_t b)
657 {
658 #ifdef POLYMORPHIC
659     return vqrshlq(a, b);
660 #else /* POLYMORPHIC */
661     return vqrshlq_n_u16(a, b);
662 #endif /* POLYMORPHIC */
663 }
664 
665 // CHECK-LABEL: @test_vqrshlq_n_u32(
666 // CHECK-NEXT:  entry:
667 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.v4i32(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 1)
668 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
669 //
test_vqrshlq_n_u32(uint32x4_t a,int32_t b)670 uint32x4_t test_vqrshlq_n_u32(uint32x4_t a, int32_t b)
671 {
672 #ifdef POLYMORPHIC
673     return vqrshlq(a, b);
674 #else /* POLYMORPHIC */
675     return vqrshlq_n_u32(a, b);
676 #endif /* POLYMORPHIC */
677 }
678 
679 // CHECK-LABEL: @test_vshlq_m_s8(
680 // CHECK-NEXT:  entry:
681 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
682 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
683 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 0, i32 0, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
684 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
685 //
test_vshlq_m_s8(int8x16_t inactive,int8x16_t a,int8x16_t b,mve_pred16_t p)686 int8x16_t test_vshlq_m_s8(int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)
687 {
688 #ifdef POLYMORPHIC
689     return vshlq_m(inactive, a, b, p);
690 #else /* POLYMORPHIC */
691     return vshlq_m_s8(inactive, a, b, p);
692 #endif /* POLYMORPHIC */
693 }
694 
695 // CHECK-LABEL: @test_vshlq_m_s16(
696 // CHECK-NEXT:  entry:
697 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
698 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
699 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 0, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
700 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
701 //
test_vshlq_m_s16(int16x8_t inactive,int16x8_t a,int16x8_t b,mve_pred16_t p)702 int16x8_t test_vshlq_m_s16(int16x8_t inactive, int16x8_t a, int16x8_t b, mve_pred16_t p)
703 {
704 #ifdef POLYMORPHIC
705     return vshlq_m(inactive, a, b, p);
706 #else /* POLYMORPHIC */
707     return vshlq_m_s16(inactive, a, b, p);
708 #endif /* POLYMORPHIC */
709 }
710 
711 // CHECK-LABEL: @test_vshlq_m_s32(
712 // CHECK-NEXT:  entry:
713 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
714 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
715 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 0, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
716 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
717 //
test_vshlq_m_s32(int32x4_t inactive,int32x4_t a,int32x4_t b,mve_pred16_t p)718 int32x4_t test_vshlq_m_s32(int32x4_t inactive, int32x4_t a, int32x4_t b, mve_pred16_t p)
719 {
720 #ifdef POLYMORPHIC
721     return vshlq_m(inactive, a, b, p);
722 #else /* POLYMORPHIC */
723     return vshlq_m_s32(inactive, a, b, p);
724 #endif /* POLYMORPHIC */
725 }
726 
727 // CHECK-LABEL: @test_vshlq_m_u8(
728 // CHECK-NEXT:  entry:
729 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
730 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
731 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 0, i32 1, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
732 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
733 //
test_vshlq_m_u8(uint8x16_t inactive,uint8x16_t a,int8x16_t b,mve_pred16_t p)734 uint8x16_t test_vshlq_m_u8(uint8x16_t inactive, uint8x16_t a, int8x16_t b, mve_pred16_t p)
735 {
736 #ifdef POLYMORPHIC
737     return vshlq_m(inactive, a, b, p);
738 #else /* POLYMORPHIC */
739     return vshlq_m_u8(inactive, a, b, p);
740 #endif /* POLYMORPHIC */
741 }
742 
743 // CHECK-LABEL: @test_vshlq_m_u16(
744 // CHECK-NEXT:  entry:
745 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
746 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
747 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 0, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
748 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
749 //
test_vshlq_m_u16(uint16x8_t inactive,uint16x8_t a,int16x8_t b,mve_pred16_t p)750 uint16x8_t test_vshlq_m_u16(uint16x8_t inactive, uint16x8_t a, int16x8_t b, mve_pred16_t p)
751 {
752 #ifdef POLYMORPHIC
753     return vshlq_m(inactive, a, b, p);
754 #else /* POLYMORPHIC */
755     return vshlq_m_u16(inactive, a, b, p);
756 #endif /* POLYMORPHIC */
757 }
758 
759 // CHECK-LABEL: @test_vshlq_m_u32(
760 // CHECK-NEXT:  entry:
761 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
762 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
763 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 0, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
764 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
765 //
test_vshlq_m_u32(uint32x4_t inactive,uint32x4_t a,int32x4_t b,mve_pred16_t p)766 uint32x4_t test_vshlq_m_u32(uint32x4_t inactive, uint32x4_t a, int32x4_t b, mve_pred16_t p)
767 {
768 #ifdef POLYMORPHIC
769     return vshlq_m(inactive, a, b, p);
770 #else /* POLYMORPHIC */
771     return vshlq_m_u32(inactive, a, b, p);
772 #endif /* POLYMORPHIC */
773 }
774 
775 // CHECK-LABEL: @test_vshlq_x_s8(
776 // CHECK-NEXT:  entry:
777 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
778 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
779 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 0, i32 0, <16 x i1> [[TMP1]], <16 x i8> undef)
780 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
781 //
test_vshlq_x_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)782 int8x16_t test_vshlq_x_s8(int8x16_t a, int8x16_t b, mve_pred16_t p)
783 {
784 #ifdef POLYMORPHIC
785     return vshlq_x(a, b, p);
786 #else /* POLYMORPHIC */
787     return vshlq_x_s8(a, b, p);
788 #endif /* POLYMORPHIC */
789 }
790 
791 // CHECK-LABEL: @test_vshlq_x_s16(
792 // CHECK-NEXT:  entry:
793 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
794 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
795 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 0, i32 0, <8 x i1> [[TMP1]], <8 x i16> undef)
796 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
797 //
test_vshlq_x_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)798 int16x8_t test_vshlq_x_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
799 {
800 #ifdef POLYMORPHIC
801     return vshlq_x(a, b, p);
802 #else /* POLYMORPHIC */
803     return vshlq_x_s16(a, b, p);
804 #endif /* POLYMORPHIC */
805 }
806 
807 // CHECK-LABEL: @test_vshlq_x_s32(
808 // CHECK-NEXT:  entry:
809 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
810 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
811 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 0, i32 0, <4 x i1> [[TMP1]], <4 x i32> undef)
812 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
813 //
test_vshlq_x_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)814 int32x4_t test_vshlq_x_s32(int32x4_t a, int32x4_t b, mve_pred16_t p)
815 {
816 #ifdef POLYMORPHIC
817     return vshlq_x(a, b, p);
818 #else /* POLYMORPHIC */
819     return vshlq_x_s32(a, b, p);
820 #endif /* POLYMORPHIC */
821 }
822 
823 // CHECK-LABEL: @test_vshlq_x_u8(
824 // CHECK-NEXT:  entry:
825 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
826 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
827 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 0, i32 1, <16 x i1> [[TMP1]], <16 x i8> undef)
828 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
829 //
test_vshlq_x_u8(uint8x16_t a,int8x16_t b,mve_pred16_t p)830 uint8x16_t test_vshlq_x_u8(uint8x16_t a, int8x16_t b, mve_pred16_t p)
831 {
832 #ifdef POLYMORPHIC
833     return vshlq_x(a, b, p);
834 #else /* POLYMORPHIC */
835     return vshlq_x_u8(a, b, p);
836 #endif /* POLYMORPHIC */
837 }
838 
839 // CHECK-LABEL: @test_vshlq_x_u16(
840 // CHECK-NEXT:  entry:
841 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
842 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
843 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 0, i32 1, <8 x i1> [[TMP1]], <8 x i16> undef)
844 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
845 //
test_vshlq_x_u16(uint16x8_t a,int16x8_t b,mve_pred16_t p)846 uint16x8_t test_vshlq_x_u16(uint16x8_t a, int16x8_t b, mve_pred16_t p)
847 {
848 #ifdef POLYMORPHIC
849     return vshlq_x(a, b, p);
850 #else /* POLYMORPHIC */
851     return vshlq_x_u16(a, b, p);
852 #endif /* POLYMORPHIC */
853 }
854 
855 // CHECK-LABEL: @test_vshlq_x_u32(
856 // CHECK-NEXT:  entry:
857 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
858 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
859 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 0, i32 1, <4 x i1> [[TMP1]], <4 x i32> undef)
860 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
861 //
test_vshlq_x_u32(uint32x4_t a,int32x4_t b,mve_pred16_t p)862 uint32x4_t test_vshlq_x_u32(uint32x4_t a, int32x4_t b, mve_pred16_t p)
863 {
864 #ifdef POLYMORPHIC
865     return vshlq_x(a, b, p);
866 #else /* POLYMORPHIC */
867     return vshlq_x_u32(a, b, p);
868 #endif /* POLYMORPHIC */
869 }
870 
871 // CHECK-LABEL: @test_vshlq_m_r_s8(
872 // CHECK-NEXT:  entry:
873 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
874 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
875 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 0, <16 x i1> [[TMP1]])
876 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
877 //
test_vshlq_m_r_s8(int8x16_t a,int32_t b,mve_pred16_t p)878 int8x16_t test_vshlq_m_r_s8(int8x16_t a, int32_t b, mve_pred16_t p)
879 {
880 #ifdef POLYMORPHIC
881     return vshlq_m_r(a, b, p);
882 #else /* POLYMORPHIC */
883     return vshlq_m_r_s8(a, b, p);
884 #endif /* POLYMORPHIC */
885 }
886 
887 // CHECK-LABEL: @test_vshlq_m_r_s16(
888 // CHECK-NEXT:  entry:
889 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
890 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
891 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 0, <8 x i1> [[TMP1]])
892 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
893 //
test_vshlq_m_r_s16(int16x8_t a,int32_t b,mve_pred16_t p)894 int16x8_t test_vshlq_m_r_s16(int16x8_t a, int32_t b, mve_pred16_t p)
895 {
896 #ifdef POLYMORPHIC
897     return vshlq_m_r(a, b, p);
898 #else /* POLYMORPHIC */
899     return vshlq_m_r_s16(a, b, p);
900 #endif /* POLYMORPHIC */
901 }
902 
903 // CHECK-LABEL: @test_vshlq_m_r_s32(
904 // CHECK-NEXT:  entry:
905 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
906 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
907 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 0, <4 x i1> [[TMP1]])
908 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
909 //
test_vshlq_m_r_s32(int32x4_t a,int32_t b,mve_pred16_t p)910 int32x4_t test_vshlq_m_r_s32(int32x4_t a, int32_t b, mve_pred16_t p)
911 {
912 #ifdef POLYMORPHIC
913     return vshlq_m_r(a, b, p);
914 #else /* POLYMORPHIC */
915     return vshlq_m_r_s32(a, b, p);
916 #endif /* POLYMORPHIC */
917 }
918 
919 // CHECK-LABEL: @test_vshlq_m_r_u8(
920 // CHECK-NEXT:  entry:
921 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
922 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
923 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 1, <16 x i1> [[TMP1]])
924 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
925 //
test_vshlq_m_r_u8(uint8x16_t a,int32_t b,mve_pred16_t p)926 uint8x16_t test_vshlq_m_r_u8(uint8x16_t a, int32_t b, mve_pred16_t p)
927 {
928 #ifdef POLYMORPHIC
929     return vshlq_m_r(a, b, p);
930 #else /* POLYMORPHIC */
931     return vshlq_m_r_u8(a, b, p);
932 #endif /* POLYMORPHIC */
933 }
934 
935 // CHECK-LABEL: @test_vshlq_m_r_u16(
936 // CHECK-NEXT:  entry:
937 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
938 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
939 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 1, <8 x i1> [[TMP1]])
940 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
941 //
test_vshlq_m_r_u16(uint16x8_t a,int32_t b,mve_pred16_t p)942 uint16x8_t test_vshlq_m_r_u16(uint16x8_t a, int32_t b, mve_pred16_t p)
943 {
944 #ifdef POLYMORPHIC
945     return vshlq_m_r(a, b, p);
946 #else /* POLYMORPHIC */
947     return vshlq_m_r_u16(a, b, p);
948 #endif /* POLYMORPHIC */
949 }
950 
951 // CHECK-LABEL: @test_vshlq_m_r_u32(
952 // CHECK-NEXT:  entry:
953 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
954 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
955 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 0, i32 1, <4 x i1> [[TMP1]])
956 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
957 //
test_vshlq_m_r_u32(uint32x4_t a,int32_t b,mve_pred16_t p)958 uint32x4_t test_vshlq_m_r_u32(uint32x4_t a, int32_t b, mve_pred16_t p)
959 {
960 #ifdef POLYMORPHIC
961     return vshlq_m_r(a, b, p);
962 #else /* POLYMORPHIC */
963     return vshlq_m_r_u32(a, b, p);
964 #endif /* POLYMORPHIC */
965 }
966 
967 // CHECK-LABEL: @test_vqshlq_m_s8(
968 // CHECK-NEXT:  entry:
969 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
970 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
971 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 1, i32 0, i32 0, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
972 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
973 //
test_vqshlq_m_s8(int8x16_t inactive,int8x16_t a,int8x16_t b,mve_pred16_t p)974 int8x16_t test_vqshlq_m_s8(int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)
975 {
976 #ifdef POLYMORPHIC
977     return vqshlq_m(inactive, a, b, p);
978 #else /* POLYMORPHIC */
979     return vqshlq_m_s8(inactive, a, b, p);
980 #endif /* POLYMORPHIC */
981 }
982 
983 // CHECK-LABEL: @test_vqshlq_m_s16(
984 // CHECK-NEXT:  entry:
985 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
986 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
987 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, i32 0, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
988 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
989 //
test_vqshlq_m_s16(int16x8_t inactive,int16x8_t a,int16x8_t b,mve_pred16_t p)990 int16x8_t test_vqshlq_m_s16(int16x8_t inactive, int16x8_t a, int16x8_t b, mve_pred16_t p)
991 {
992 #ifdef POLYMORPHIC
993     return vqshlq_m(inactive, a, b, p);
994 #else /* POLYMORPHIC */
995     return vqshlq_m_s16(inactive, a, b, p);
996 #endif /* POLYMORPHIC */
997 }
998 
999 // CHECK-LABEL: @test_vqshlq_m_s32(
1000 // CHECK-NEXT:  entry:
1001 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1002 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1003 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, i32 0, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1004 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1005 //
test_vqshlq_m_s32(int32x4_t inactive,int32x4_t a,int32x4_t b,mve_pred16_t p)1006 int32x4_t test_vqshlq_m_s32(int32x4_t inactive, int32x4_t a, int32x4_t b, mve_pred16_t p)
1007 {
1008 #ifdef POLYMORPHIC
1009     return vqshlq_m(inactive, a, b, p);
1010 #else /* POLYMORPHIC */
1011     return vqshlq_m_s32(inactive, a, b, p);
1012 #endif /* POLYMORPHIC */
1013 }
1014 
1015 // CHECK-LABEL: @test_vqshlq_m_u8(
1016 // CHECK-NEXT:  entry:
1017 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1018 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1019 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 1, i32 0, i32 1, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
1020 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1021 //
test_vqshlq_m_u8(uint8x16_t inactive,uint8x16_t a,int8x16_t b,mve_pred16_t p)1022 uint8x16_t test_vqshlq_m_u8(uint8x16_t inactive, uint8x16_t a, int8x16_t b, mve_pred16_t p)
1023 {
1024 #ifdef POLYMORPHIC
1025     return vqshlq_m(inactive, a, b, p);
1026 #else /* POLYMORPHIC */
1027     return vqshlq_m_u8(inactive, a, b, p);
1028 #endif /* POLYMORPHIC */
1029 }
1030 
1031 // CHECK-LABEL: @test_vqshlq_m_u16(
1032 // CHECK-NEXT:  entry:
1033 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1034 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1035 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, i32 0, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1036 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1037 //
test_vqshlq_m_u16(uint16x8_t inactive,uint16x8_t a,int16x8_t b,mve_pred16_t p)1038 uint16x8_t test_vqshlq_m_u16(uint16x8_t inactive, uint16x8_t a, int16x8_t b, mve_pred16_t p)
1039 {
1040 #ifdef POLYMORPHIC
1041     return vqshlq_m(inactive, a, b, p);
1042 #else /* POLYMORPHIC */
1043     return vqshlq_m_u16(inactive, a, b, p);
1044 #endif /* POLYMORPHIC */
1045 }
1046 
1047 // CHECK-LABEL: @test_vqshlq_m_u32(
1048 // CHECK-NEXT:  entry:
1049 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1050 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1051 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, i32 0, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1052 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1053 //
test_vqshlq_m_u32(uint32x4_t inactive,uint32x4_t a,int32x4_t b,mve_pred16_t p)1054 uint32x4_t test_vqshlq_m_u32(uint32x4_t inactive, uint32x4_t a, int32x4_t b, mve_pred16_t p)
1055 {
1056 #ifdef POLYMORPHIC
1057     return vqshlq_m(inactive, a, b, p);
1058 #else /* POLYMORPHIC */
1059     return vqshlq_m_u32(inactive, a, b, p);
1060 #endif /* POLYMORPHIC */
1061 }
1062 
1063 // CHECK-LABEL: @test_vqshlq_m_r_s8(
1064 // CHECK-NEXT:  entry:
1065 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1066 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1067 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 0, <16 x i1> [[TMP1]])
1068 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1069 //
test_vqshlq_m_r_s8(int8x16_t a,int32_t b,mve_pred16_t p)1070 int8x16_t test_vqshlq_m_r_s8(int8x16_t a, int32_t b, mve_pred16_t p)
1071 {
1072 #ifdef POLYMORPHIC
1073     return vqshlq_m_r(a, b, p);
1074 #else /* POLYMORPHIC */
1075     return vqshlq_m_r_s8(a, b, p);
1076 #endif /* POLYMORPHIC */
1077 }
1078 
1079 // CHECK-LABEL: @test_vqshlq_m_r_s16(
1080 // CHECK-NEXT:  entry:
1081 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1082 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1083 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 0, <8 x i1> [[TMP1]])
1084 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1085 //
test_vqshlq_m_r_s16(int16x8_t a,int32_t b,mve_pred16_t p)1086 int16x8_t test_vqshlq_m_r_s16(int16x8_t a, int32_t b, mve_pred16_t p)
1087 {
1088 #ifdef POLYMORPHIC
1089     return vqshlq_m_r(a, b, p);
1090 #else /* POLYMORPHIC */
1091     return vqshlq_m_r_s16(a, b, p);
1092 #endif /* POLYMORPHIC */
1093 }
1094 
1095 // CHECK-LABEL: @test_vqshlq_m_r_s32(
1096 // CHECK-NEXT:  entry:
1097 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1098 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1099 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 0, <4 x i1> [[TMP1]])
1100 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1101 //
test_vqshlq_m_r_s32(int32x4_t a,int32_t b,mve_pred16_t p)1102 int32x4_t test_vqshlq_m_r_s32(int32x4_t a, int32_t b, mve_pred16_t p)
1103 {
1104 #ifdef POLYMORPHIC
1105     return vqshlq_m_r(a, b, p);
1106 #else /* POLYMORPHIC */
1107     return vqshlq_m_r_s32(a, b, p);
1108 #endif /* POLYMORPHIC */
1109 }
1110 
1111 // CHECK-LABEL: @test_vqshlq_m_r_u8(
1112 // CHECK-NEXT:  entry:
1113 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1114 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1115 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 1, <16 x i1> [[TMP1]])
1116 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1117 //
test_vqshlq_m_r_u8(uint8x16_t a,int32_t b,mve_pred16_t p)1118 uint8x16_t test_vqshlq_m_r_u8(uint8x16_t a, int32_t b, mve_pred16_t p)
1119 {
1120 #ifdef POLYMORPHIC
1121     return vqshlq_m_r(a, b, p);
1122 #else /* POLYMORPHIC */
1123     return vqshlq_m_r_u8(a, b, p);
1124 #endif /* POLYMORPHIC */
1125 }
1126 
1127 // CHECK-LABEL: @test_vqshlq_m_r_u16(
1128 // CHECK-NEXT:  entry:
1129 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1130 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1131 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 1, <8 x i1> [[TMP1]])
1132 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1133 //
test_vqshlq_m_r_u16(uint16x8_t a,int32_t b,mve_pred16_t p)1134 uint16x8_t test_vqshlq_m_r_u16(uint16x8_t a, int32_t b, mve_pred16_t p)
1135 {
1136 #ifdef POLYMORPHIC
1137     return vqshlq_m_r(a, b, p);
1138 #else /* POLYMORPHIC */
1139     return vqshlq_m_r_u16(a, b, p);
1140 #endif /* POLYMORPHIC */
1141 }
1142 
1143 // CHECK-LABEL: @test_vqshlq_m_r_u32(
1144 // CHECK-NEXT:  entry:
1145 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1146 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1147 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 0, i32 1, <4 x i1> [[TMP1]])
1148 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1149 //
test_vqshlq_m_r_u32(uint32x4_t a,int32_t b,mve_pred16_t p)1150 uint32x4_t test_vqshlq_m_r_u32(uint32x4_t a, int32_t b, mve_pred16_t p)
1151 {
1152 #ifdef POLYMORPHIC
1153     return vqshlq_m_r(a, b, p);
1154 #else /* POLYMORPHIC */
1155     return vqshlq_m_r_u32(a, b, p);
1156 #endif /* POLYMORPHIC */
1157 }
1158 
1159 // CHECK-LABEL: @test_vrshlq_m_s8(
1160 // CHECK-NEXT:  entry:
1161 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1162 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1163 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 1, i32 0, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
1164 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1165 //
test_vrshlq_m_s8(int8x16_t inactive,int8x16_t a,int8x16_t b,mve_pred16_t p)1166 int8x16_t test_vrshlq_m_s8(int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)
1167 {
1168 #ifdef POLYMORPHIC
1169     return vrshlq_m(inactive, a, b, p);
1170 #else /* POLYMORPHIC */
1171     return vrshlq_m_s8(inactive, a, b, p);
1172 #endif /* POLYMORPHIC */
1173 }
1174 
1175 // CHECK-LABEL: @test_vrshlq_m_s16(
1176 // CHECK-NEXT:  entry:
1177 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1178 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1179 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 1, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1180 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1181 //
test_vrshlq_m_s16(int16x8_t inactive,int16x8_t a,int16x8_t b,mve_pred16_t p)1182 int16x8_t test_vrshlq_m_s16(int16x8_t inactive, int16x8_t a, int16x8_t b, mve_pred16_t p)
1183 {
1184 #ifdef POLYMORPHIC
1185     return vrshlq_m(inactive, a, b, p);
1186 #else /* POLYMORPHIC */
1187     return vrshlq_m_s16(inactive, a, b, p);
1188 #endif /* POLYMORPHIC */
1189 }
1190 
1191 // CHECK-LABEL: @test_vrshlq_m_s32(
1192 // CHECK-NEXT:  entry:
1193 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1194 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1195 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 1, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1196 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1197 //
test_vrshlq_m_s32(int32x4_t inactive,int32x4_t a,int32x4_t b,mve_pred16_t p)1198 int32x4_t test_vrshlq_m_s32(int32x4_t inactive, int32x4_t a, int32x4_t b, mve_pred16_t p)
1199 {
1200 #ifdef POLYMORPHIC
1201     return vrshlq_m(inactive, a, b, p);
1202 #else /* POLYMORPHIC */
1203     return vrshlq_m_s32(inactive, a, b, p);
1204 #endif /* POLYMORPHIC */
1205 }
1206 
1207 // CHECK-LABEL: @test_vrshlq_m_u8(
1208 // CHECK-NEXT:  entry:
1209 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1210 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1211 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 1, i32 1, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
1212 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1213 //
test_vrshlq_m_u8(uint8x16_t inactive,uint8x16_t a,int8x16_t b,mve_pred16_t p)1214 uint8x16_t test_vrshlq_m_u8(uint8x16_t inactive, uint8x16_t a, int8x16_t b, mve_pred16_t p)
1215 {
1216 #ifdef POLYMORPHIC
1217     return vrshlq_m(inactive, a, b, p);
1218 #else /* POLYMORPHIC */
1219     return vrshlq_m_u8(inactive, a, b, p);
1220 #endif /* POLYMORPHIC */
1221 }
1222 
1223 // CHECK-LABEL: @test_vrshlq_m_u16(
1224 // CHECK-NEXT:  entry:
1225 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1226 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1227 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 1, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1228 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1229 //
test_vrshlq_m_u16(uint16x8_t inactive,uint16x8_t a,int16x8_t b,mve_pred16_t p)1230 uint16x8_t test_vrshlq_m_u16(uint16x8_t inactive, uint16x8_t a, int16x8_t b, mve_pred16_t p)
1231 {
1232 #ifdef POLYMORPHIC
1233     return vrshlq_m(inactive, a, b, p);
1234 #else /* POLYMORPHIC */
1235     return vrshlq_m_u16(inactive, a, b, p);
1236 #endif /* POLYMORPHIC */
1237 }
1238 
1239 // CHECK-LABEL: @test_vrshlq_m_u32(
1240 // CHECK-NEXT:  entry:
1241 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1242 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1243 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 1, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1244 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1245 //
test_vrshlq_m_u32(uint32x4_t inactive,uint32x4_t a,int32x4_t b,mve_pred16_t p)1246 uint32x4_t test_vrshlq_m_u32(uint32x4_t inactive, uint32x4_t a, int32x4_t b, mve_pred16_t p)
1247 {
1248 #ifdef POLYMORPHIC
1249     return vrshlq_m(inactive, a, b, p);
1250 #else /* POLYMORPHIC */
1251     return vrshlq_m_u32(inactive, a, b, p);
1252 #endif /* POLYMORPHIC */
1253 }
1254 
1255 // CHECK-LABEL: @test_vrshlq_x_s8(
1256 // CHECK-NEXT:  entry:
1257 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1258 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1259 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 1, i32 0, <16 x i1> [[TMP1]], <16 x i8> undef)
1260 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1261 //
test_vrshlq_x_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)1262 int8x16_t test_vrshlq_x_s8(int8x16_t a, int8x16_t b, mve_pred16_t p)
1263 {
1264 #ifdef POLYMORPHIC
1265     return vrshlq_x(a, b, p);
1266 #else /* POLYMORPHIC */
1267     return vrshlq_x_s8(a, b, p);
1268 #endif /* POLYMORPHIC */
1269 }
1270 
1271 // CHECK-LABEL: @test_vrshlq_x_s16(
1272 // CHECK-NEXT:  entry:
1273 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1274 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1275 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 1, i32 0, <8 x i1> [[TMP1]], <8 x i16> undef)
1276 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1277 //
test_vrshlq_x_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)1278 int16x8_t test_vrshlq_x_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
1279 {
1280 #ifdef POLYMORPHIC
1281     return vrshlq_x(a, b, p);
1282 #else /* POLYMORPHIC */
1283     return vrshlq_x_s16(a, b, p);
1284 #endif /* POLYMORPHIC */
1285 }
1286 
1287 // CHECK-LABEL: @test_vrshlq_x_s32(
1288 // CHECK-NEXT:  entry:
1289 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1290 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1291 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 1, i32 0, <4 x i1> [[TMP1]], <4 x i32> undef)
1292 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1293 //
test_vrshlq_x_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)1294 int32x4_t test_vrshlq_x_s32(int32x4_t a, int32x4_t b, mve_pred16_t p)
1295 {
1296 #ifdef POLYMORPHIC
1297     return vrshlq_x(a, b, p);
1298 #else /* POLYMORPHIC */
1299     return vrshlq_x_s32(a, b, p);
1300 #endif /* POLYMORPHIC */
1301 }
1302 
1303 // CHECK-LABEL: @test_vrshlq_x_u8(
1304 // CHECK-NEXT:  entry:
1305 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1306 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1307 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 0, i32 1, i32 1, <16 x i1> [[TMP1]], <16 x i8> undef)
1308 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1309 //
test_vrshlq_x_u8(uint8x16_t a,int8x16_t b,mve_pred16_t p)1310 uint8x16_t test_vrshlq_x_u8(uint8x16_t a, int8x16_t b, mve_pred16_t p)
1311 {
1312 #ifdef POLYMORPHIC
1313     return vrshlq_x(a, b, p);
1314 #else /* POLYMORPHIC */
1315     return vrshlq_x_u8(a, b, p);
1316 #endif /* POLYMORPHIC */
1317 }
1318 
1319 // CHECK-LABEL: @test_vrshlq_x_u16(
1320 // CHECK-NEXT:  entry:
1321 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1322 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1323 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 0, i32 1, i32 1, <8 x i1> [[TMP1]], <8 x i16> undef)
1324 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1325 //
test_vrshlq_x_u16(uint16x8_t a,int16x8_t b,mve_pred16_t p)1326 uint16x8_t test_vrshlq_x_u16(uint16x8_t a, int16x8_t b, mve_pred16_t p)
1327 {
1328 #ifdef POLYMORPHIC
1329     return vrshlq_x(a, b, p);
1330 #else /* POLYMORPHIC */
1331     return vrshlq_x_u16(a, b, p);
1332 #endif /* POLYMORPHIC */
1333 }
1334 
1335 // CHECK-LABEL: @test_vrshlq_x_u32(
1336 // CHECK-NEXT:  entry:
1337 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1338 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1339 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 0, i32 1, i32 1, <4 x i1> [[TMP1]], <4 x i32> undef)
1340 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1341 //
test_vrshlq_x_u32(uint32x4_t a,int32x4_t b,mve_pred16_t p)1342 uint32x4_t test_vrshlq_x_u32(uint32x4_t a, int32x4_t b, mve_pred16_t p)
1343 {
1344 #ifdef POLYMORPHIC
1345     return vrshlq_x(a, b, p);
1346 #else /* POLYMORPHIC */
1347     return vrshlq_x_u32(a, b, p);
1348 #endif /* POLYMORPHIC */
1349 }
1350 
1351 // CHECK-LABEL: @test_vrshlq_m_n_s8(
1352 // CHECK-NEXT:  entry:
1353 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1354 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1355 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 0, <16 x i1> [[TMP1]])
1356 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1357 //
test_vrshlq_m_n_s8(int8x16_t a,int32_t b,mve_pred16_t p)1358 int8x16_t test_vrshlq_m_n_s8(int8x16_t a, int32_t b, mve_pred16_t p)
1359 {
1360 #ifdef POLYMORPHIC
1361     return vrshlq_m_n(a, b, p);
1362 #else /* POLYMORPHIC */
1363     return vrshlq_m_n_s8(a, b, p);
1364 #endif /* POLYMORPHIC */
1365 }
1366 
1367 // CHECK-LABEL: @test_vrshlq_m_n_s16(
1368 // CHECK-NEXT:  entry:
1369 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1370 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1371 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 0, <8 x i1> [[TMP1]])
1372 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1373 //
test_vrshlq_m_n_s16(int16x8_t a,int32_t b,mve_pred16_t p)1374 int16x8_t test_vrshlq_m_n_s16(int16x8_t a, int32_t b, mve_pred16_t p)
1375 {
1376 #ifdef POLYMORPHIC
1377     return vrshlq_m_n(a, b, p);
1378 #else /* POLYMORPHIC */
1379     return vrshlq_m_n_s16(a, b, p);
1380 #endif /* POLYMORPHIC */
1381 }
1382 
1383 // CHECK-LABEL: @test_vrshlq_m_n_s32(
1384 // CHECK-NEXT:  entry:
1385 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1386 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1387 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 0, <4 x i1> [[TMP1]])
1388 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1389 //
test_vrshlq_m_n_s32(int32x4_t a,int32_t b,mve_pred16_t p)1390 int32x4_t test_vrshlq_m_n_s32(int32x4_t a, int32_t b, mve_pred16_t p)
1391 {
1392 #ifdef POLYMORPHIC
1393     return vrshlq_m_n(a, b, p);
1394 #else /* POLYMORPHIC */
1395     return vrshlq_m_n_s32(a, b, p);
1396 #endif /* POLYMORPHIC */
1397 }
1398 
1399 // CHECK-LABEL: @test_vrshlq_m_n_u8(
1400 // CHECK-NEXT:  entry:
1401 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1402 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1403 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 1, <16 x i1> [[TMP1]])
1404 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1405 //
test_vrshlq_m_n_u8(uint8x16_t a,int32_t b,mve_pred16_t p)1406 uint8x16_t test_vrshlq_m_n_u8(uint8x16_t a, int32_t b, mve_pred16_t p)
1407 {
1408 #ifdef POLYMORPHIC
1409     return vrshlq_m_n(a, b, p);
1410 #else /* POLYMORPHIC */
1411     return vrshlq_m_n_u8(a, b, p);
1412 #endif /* POLYMORPHIC */
1413 }
1414 
1415 // CHECK-LABEL: @test_vrshlq_m_n_u16(
1416 // CHECK-NEXT:  entry:
1417 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1418 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1419 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 1, <8 x i1> [[TMP1]])
1420 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1421 //
test_vrshlq_m_n_u16(uint16x8_t a,int32_t b,mve_pred16_t p)1422 uint16x8_t test_vrshlq_m_n_u16(uint16x8_t a, int32_t b, mve_pred16_t p)
1423 {
1424 #ifdef POLYMORPHIC
1425     return vrshlq_m_n(a, b, p);
1426 #else /* POLYMORPHIC */
1427     return vrshlq_m_n_u16(a, b, p);
1428 #endif /* POLYMORPHIC */
1429 }
1430 
1431 // CHECK-LABEL: @test_vrshlq_m_n_u32(
1432 // CHECK-NEXT:  entry:
1433 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1434 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1435 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 0, i32 1, i32 1, <4 x i1> [[TMP1]])
1436 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1437 //
test_vrshlq_m_n_u32(uint32x4_t a,int32_t b,mve_pred16_t p)1438 uint32x4_t test_vrshlq_m_n_u32(uint32x4_t a, int32_t b, mve_pred16_t p)
1439 {
1440 #ifdef POLYMORPHIC
1441     return vrshlq_m_n(a, b, p);
1442 #else /* POLYMORPHIC */
1443     return vrshlq_m_n_u32(a, b, p);
1444 #endif /* POLYMORPHIC */
1445 }
1446 
1447 // CHECK-LABEL: @test_vqrshlq_m_s8(
1448 // CHECK-NEXT:  entry:
1449 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1450 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1451 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 1, i32 1, i32 0, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
1452 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1453 //
test_vqrshlq_m_s8(int8x16_t inactive,int8x16_t a,int8x16_t b,mve_pred16_t p)1454 int8x16_t test_vqrshlq_m_s8(int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)
1455 {
1456 #ifdef POLYMORPHIC
1457     return vqrshlq_m(inactive, a, b, p);
1458 #else /* POLYMORPHIC */
1459     return vqrshlq_m_s8(inactive, a, b, p);
1460 #endif /* POLYMORPHIC */
1461 }
1462 
1463 // CHECK-LABEL: @test_vqrshlq_m_s16(
1464 // CHECK-NEXT:  entry:
1465 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1466 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1467 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, i32 1, i32 0, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1468 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1469 //
test_vqrshlq_m_s16(int16x8_t inactive,int16x8_t a,int16x8_t b,mve_pred16_t p)1470 int16x8_t test_vqrshlq_m_s16(int16x8_t inactive, int16x8_t a, int16x8_t b, mve_pred16_t p)
1471 {
1472 #ifdef POLYMORPHIC
1473     return vqrshlq_m(inactive, a, b, p);
1474 #else /* POLYMORPHIC */
1475     return vqrshlq_m_s16(inactive, a, b, p);
1476 #endif /* POLYMORPHIC */
1477 }
1478 
1479 // CHECK-LABEL: @test_vqrshlq_m_s32(
1480 // CHECK-NEXT:  entry:
1481 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1482 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1483 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, i32 1, i32 0, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1484 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1485 //
test_vqrshlq_m_s32(int32x4_t inactive,int32x4_t a,int32x4_t b,mve_pred16_t p)1486 int32x4_t test_vqrshlq_m_s32(int32x4_t inactive, int32x4_t a, int32x4_t b, mve_pred16_t p)
1487 {
1488 #ifdef POLYMORPHIC
1489     return vqrshlq_m(inactive, a, b, p);
1490 #else /* POLYMORPHIC */
1491     return vqrshlq_m_s32(inactive, a, b, p);
1492 #endif /* POLYMORPHIC */
1493 }
1494 
1495 // CHECK-LABEL: @test_vqrshlq_m_u8(
1496 // CHECK-NEXT:  entry:
1497 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1498 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1499 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.vector.predicated.v16i8.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 1, i32 1, i32 1, <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])
1500 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1501 //
test_vqrshlq_m_u8(uint8x16_t inactive,uint8x16_t a,int8x16_t b,mve_pred16_t p)1502 uint8x16_t test_vqrshlq_m_u8(uint8x16_t inactive, uint8x16_t a, int8x16_t b, mve_pred16_t p)
1503 {
1504 #ifdef POLYMORPHIC
1505     return vqrshlq_m(inactive, a, b, p);
1506 #else /* POLYMORPHIC */
1507     return vqrshlq_m_u8(inactive, a, b, p);
1508 #endif /* POLYMORPHIC */
1509 }
1510 
1511 // CHECK-LABEL: @test_vqrshlq_m_u16(
1512 // CHECK-NEXT:  entry:
1513 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1514 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1515 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.vector.predicated.v8i16.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 1, i32 1, i32 1, <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])
1516 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1517 //
test_vqrshlq_m_u16(uint16x8_t inactive,uint16x8_t a,int16x8_t b,mve_pred16_t p)1518 uint16x8_t test_vqrshlq_m_u16(uint16x8_t inactive, uint16x8_t a, int16x8_t b, mve_pred16_t p)
1519 {
1520 #ifdef POLYMORPHIC
1521     return vqrshlq_m(inactive, a, b, p);
1522 #else /* POLYMORPHIC */
1523     return vqrshlq_m_u16(inactive, a, b, p);
1524 #endif /* POLYMORPHIC */
1525 }
1526 
1527 // CHECK-LABEL: @test_vqrshlq_m_u32(
1528 // CHECK-NEXT:  entry:
1529 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1530 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1531 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.vector.predicated.v4i32.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 1, i32 1, i32 1, <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])
1532 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1533 //
test_vqrshlq_m_u32(uint32x4_t inactive,uint32x4_t a,int32x4_t b,mve_pred16_t p)1534 uint32x4_t test_vqrshlq_m_u32(uint32x4_t inactive, uint32x4_t a, int32x4_t b, mve_pred16_t p)
1535 {
1536 #ifdef POLYMORPHIC
1537     return vqrshlq_m(inactive, a, b, p);
1538 #else /* POLYMORPHIC */
1539     return vqrshlq_m_u32(inactive, a, b, p);
1540 #endif /* POLYMORPHIC */
1541 }
1542 
1543 // CHECK-LABEL: @test_vqrshlq_m_n_s8(
1544 // CHECK-NEXT:  entry:
1545 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1546 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1547 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 0, <16 x i1> [[TMP1]])
1548 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1549 //
test_vqrshlq_m_n_s8(int8x16_t a,int32_t b,mve_pred16_t p)1550 int8x16_t test_vqrshlq_m_n_s8(int8x16_t a, int32_t b, mve_pred16_t p)
1551 {
1552 #ifdef POLYMORPHIC
1553     return vqrshlq_m_n(a, b, p);
1554 #else /* POLYMORPHIC */
1555     return vqrshlq_m_n_s8(a, b, p);
1556 #endif /* POLYMORPHIC */
1557 }
1558 
1559 // CHECK-LABEL: @test_vqrshlq_m_n_s16(
1560 // CHECK-NEXT:  entry:
1561 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1562 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1563 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 0, <8 x i1> [[TMP1]])
1564 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1565 //
test_vqrshlq_m_n_s16(int16x8_t a,int32_t b,mve_pred16_t p)1566 int16x8_t test_vqrshlq_m_n_s16(int16x8_t a, int32_t b, mve_pred16_t p)
1567 {
1568 #ifdef POLYMORPHIC
1569     return vqrshlq_m_n(a, b, p);
1570 #else /* POLYMORPHIC */
1571     return vqrshlq_m_n_s16(a, b, p);
1572 #endif /* POLYMORPHIC */
1573 }
1574 
1575 // CHECK-LABEL: @test_vqrshlq_m_n_s32(
1576 // CHECK-NEXT:  entry:
1577 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1578 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1579 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 0, <4 x i1> [[TMP1]])
1580 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1581 //
test_vqrshlq_m_n_s32(int32x4_t a,int32_t b,mve_pred16_t p)1582 int32x4_t test_vqrshlq_m_n_s32(int32x4_t a, int32_t b, mve_pred16_t p)
1583 {
1584 #ifdef POLYMORPHIC
1585     return vqrshlq_m_n(a, b, p);
1586 #else /* POLYMORPHIC */
1587     return vqrshlq_m_n_s32(a, b, p);
1588 #endif /* POLYMORPHIC */
1589 }
1590 
1591 // CHECK-LABEL: @test_vqrshlq_m_n_u8(
1592 // CHECK-NEXT:  entry:
1593 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1594 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1595 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.vshl.scalar.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 1, <16 x i1> [[TMP1]])
1596 // CHECK-NEXT:    ret <16 x i8> [[TMP2]]
1597 //
test_vqrshlq_m_n_u8(uint8x16_t a,int32_t b,mve_pred16_t p)1598 uint8x16_t test_vqrshlq_m_n_u8(uint8x16_t a, int32_t b, mve_pred16_t p)
1599 {
1600 #ifdef POLYMORPHIC
1601     return vqrshlq_m_n(a, b, p);
1602 #else /* POLYMORPHIC */
1603     return vqrshlq_m_n_u8(a, b, p);
1604 #endif /* POLYMORPHIC */
1605 }
1606 
1607 // CHECK-LABEL: @test_vqrshlq_m_n_u16(
1608 // CHECK-NEXT:  entry:
1609 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1610 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1611 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.vshl.scalar.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 1, <8 x i1> [[TMP1]])
1612 // CHECK-NEXT:    ret <8 x i16> [[TMP2]]
1613 //
test_vqrshlq_m_n_u16(uint16x8_t a,int32_t b,mve_pred16_t p)1614 uint16x8_t test_vqrshlq_m_n_u16(uint16x8_t a, int32_t b, mve_pred16_t p)
1615 {
1616 #ifdef POLYMORPHIC
1617     return vqrshlq_m_n(a, b, p);
1618 #else /* POLYMORPHIC */
1619     return vqrshlq_m_n_u16(a, b, p);
1620 #endif /* POLYMORPHIC */
1621 }
1622 
1623 // CHECK-LABEL: @test_vqrshlq_m_n_u32(
1624 // CHECK-NEXT:  entry:
1625 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1626 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1627 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vshl.scalar.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], i32 [[B:%.*]], i32 1, i32 1, i32 1, <4 x i1> [[TMP1]])
1628 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
1629 //
test_vqrshlq_m_n_u32(uint32x4_t a,int32_t b,mve_pred16_t p)1630 uint32x4_t test_vqrshlq_m_n_u32(uint32x4_t a, int32_t b, mve_pred16_t p)
1631 {
1632 #ifdef POLYMORPHIC
1633     return vqrshlq_m_n(a, b, p);
1634 #else /* POLYMORPHIC */
1635     return vqrshlq_m_n_u32(a, b, p);
1636 #endif /* POLYMORPHIC */
1637 }
1638 
1639