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 -sroa | 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 -sroa | FileCheck %s
4 
5 #include <arm_mve.h>
6 
7 // CHECK-LABEL: @test_vmladavaq_s8(
8 // CHECK-NEXT:  entry:
9 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 0, i32 0, i32 0, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]])
10 // CHECK-NEXT:    ret i32 [[TMP0]]
11 //
test_vmladavaq_s8(int32_t a,int8x16_t b,int8x16_t c)12 int32_t test_vmladavaq_s8(int32_t a, int8x16_t b, int8x16_t c) {
13 #ifdef POLYMORPHIC
14   return vmladavaq(a, b, c);
15 #else
16   return vmladavaq_s8(a, b, c);
17 #endif
18 }
19 
20 // CHECK-LABEL: @test_vmladavaq_s16(
21 // CHECK-NEXT:  entry:
22 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 0, i32 0, i32 0, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]])
23 // CHECK-NEXT:    ret i32 [[TMP0]]
24 //
test_vmladavaq_s16(int32_t a,int16x8_t b,int16x8_t c)25 int32_t test_vmladavaq_s16(int32_t a, int16x8_t b, int16x8_t c) {
26 #ifdef POLYMORPHIC
27   return vmladavaq(a, b, c);
28 #else
29   return vmladavaq_s16(a, b, c);
30 #endif
31 }
32 
33 // CHECK-LABEL: @test_vmladavaq_s32(
34 // CHECK-NEXT:  entry:
35 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 0, i32 0, i32 0, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]])
36 // CHECK-NEXT:    ret i32 [[TMP0]]
37 //
test_vmladavaq_s32(int32_t a,int32x4_t b,int32x4_t c)38 int32_t test_vmladavaq_s32(int32_t a, int32x4_t b, int32x4_t c) {
39 #ifdef POLYMORPHIC
40   return vmladavaq(a, b, c);
41 #else
42   return vmladavaq_s32(a, b, c);
43 #endif
44 }
45 
46 // CHECK-LABEL: @test_vmladavaq_u8(
47 // CHECK-NEXT:  entry:
48 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 1, i32 0, i32 0, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]])
49 // CHECK-NEXT:    ret i32 [[TMP0]]
50 //
test_vmladavaq_u8(uint32_t a,uint8x16_t b,uint8x16_t c)51 uint32_t test_vmladavaq_u8(uint32_t a, uint8x16_t b, uint8x16_t c) {
52 #ifdef POLYMORPHIC
53   return vmladavaq(a, b, c);
54 #else
55   return vmladavaq_u8(a, b, c);
56 #endif
57 }
58 
59 // CHECK-LABEL: @test_vmladavaq_u16(
60 // CHECK-NEXT:  entry:
61 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 1, i32 0, i32 0, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]])
62 // CHECK-NEXT:    ret i32 [[TMP0]]
63 //
test_vmladavaq_u16(uint32_t a,uint16x8_t b,uint16x8_t c)64 uint32_t test_vmladavaq_u16(uint32_t a, uint16x8_t b, uint16x8_t c) {
65 #ifdef POLYMORPHIC
66   return vmladavaq(a, b, c);
67 #else
68   return vmladavaq_u16(a, b, c);
69 #endif
70 }
71 
72 // CHECK-LABEL: @test_vmladavaq_u32(
73 // CHECK-NEXT:  entry:
74 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 1, i32 0, i32 0, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]])
75 // CHECK-NEXT:    ret i32 [[TMP0]]
76 //
test_vmladavaq_u32(uint32_t a,uint32x4_t b,uint32x4_t c)77 uint32_t test_vmladavaq_u32(uint32_t a, uint32x4_t b, uint32x4_t c) {
78 #ifdef POLYMORPHIC
79   return vmladavaq(a, b, c);
80 #else
81   return vmladavaq_u32(a, b, c);
82 #endif
83 }
84 
85 // CHECK-LABEL: @test_vmladavaxq_s8(
86 // CHECK-NEXT:  entry:
87 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 0, i32 0, i32 1, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]])
88 // CHECK-NEXT:    ret i32 [[TMP0]]
89 //
test_vmladavaxq_s8(int32_t a,int8x16_t b,int8x16_t c)90 int32_t test_vmladavaxq_s8(int32_t a, int8x16_t b, int8x16_t c) {
91 #ifdef POLYMORPHIC
92   return vmladavaxq(a, b, c);
93 #else
94   return vmladavaxq_s8(a, b, c);
95 #endif
96 }
97 
98 // CHECK-LABEL: @test_vmladavaxq_s16(
99 // CHECK-NEXT:  entry:
100 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 0, i32 0, i32 1, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]])
101 // CHECK-NEXT:    ret i32 [[TMP0]]
102 //
test_vmladavaxq_s16(int32_t a,int16x8_t b,int16x8_t c)103 int32_t test_vmladavaxq_s16(int32_t a, int16x8_t b, int16x8_t c) {
104 #ifdef POLYMORPHIC
105   return vmladavaxq(a, b, c);
106 #else
107   return vmladavaxq_s16(a, b, c);
108 #endif
109 }
110 
111 // CHECK-LABEL: @test_vmladavaxq_s32(
112 // CHECK-NEXT:  entry:
113 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 0, i32 0, i32 1, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]])
114 // CHECK-NEXT:    ret i32 [[TMP0]]
115 //
test_vmladavaxq_s32(int32_t a,int32x4_t b,int32x4_t c)116 int32_t test_vmladavaxq_s32(int32_t a, int32x4_t b, int32x4_t c) {
117 #ifdef POLYMORPHIC
118   return vmladavaxq(a, b, c);
119 #else
120   return vmladavaxq_s32(a, b, c);
121 #endif
122 }
123 
124 // CHECK-LABEL: @test_vmlsdavaq_s8(
125 // CHECK-NEXT:  entry:
126 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 0, i32 1, i32 0, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]])
127 // CHECK-NEXT:    ret i32 [[TMP0]]
128 //
test_vmlsdavaq_s8(int32_t a,int8x16_t b,int8x16_t c)129 int32_t test_vmlsdavaq_s8(int32_t a, int8x16_t b, int8x16_t c) {
130 #ifdef POLYMORPHIC
131   return vmlsdavaq(a, b, c);
132 #else
133   return vmlsdavaq_s8(a, b, c);
134 #endif
135 }
136 
137 // CHECK-LABEL: @test_vmlsdavaq_s16(
138 // CHECK-NEXT:  entry:
139 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 0, i32 1, i32 0, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]])
140 // CHECK-NEXT:    ret i32 [[TMP0]]
141 //
test_vmlsdavaq_s16(int32_t a,int16x8_t b,int16x8_t c)142 int32_t test_vmlsdavaq_s16(int32_t a, int16x8_t b, int16x8_t c) {
143 #ifdef POLYMORPHIC
144   return vmlsdavaq(a, b, c);
145 #else
146   return vmlsdavaq_s16(a, b, c);
147 #endif
148 }
149 
150 // CHECK-LABEL: @test_vmlsdavaq_s32(
151 // CHECK-NEXT:  entry:
152 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 0, i32 1, i32 0, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]])
153 // CHECK-NEXT:    ret i32 [[TMP0]]
154 //
test_vmlsdavaq_s32(int32_t a,int32x4_t b,int32x4_t c)155 int32_t test_vmlsdavaq_s32(int32_t a, int32x4_t b, int32x4_t c) {
156 #ifdef POLYMORPHIC
157   return vmlsdavaq(a, b, c);
158 #else
159   return vmlsdavaq_s32(a, b, c);
160 #endif
161 }
162 
163 // CHECK-LABEL: @test_vmlsdavaxq_s8(
164 // CHECK-NEXT:  entry:
165 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 0, i32 1, i32 1, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]])
166 // CHECK-NEXT:    ret i32 [[TMP0]]
167 //
test_vmlsdavaxq_s8(int32_t a,int8x16_t b,int8x16_t c)168 int32_t test_vmlsdavaxq_s8(int32_t a, int8x16_t b, int8x16_t c) {
169 #ifdef POLYMORPHIC
170   return vmlsdavaxq(a, b, c);
171 #else
172   return vmlsdavaxq_s8(a, b, c);
173 #endif
174 }
175 
176 // CHECK-LABEL: @test_vmlsdavaxq_s16(
177 // CHECK-NEXT:  entry:
178 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 0, i32 1, i32 1, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]])
179 // CHECK-NEXT:    ret i32 [[TMP0]]
180 //
test_vmlsdavaxq_s16(int32_t a,int16x8_t b,int16x8_t c)181 int32_t test_vmlsdavaxq_s16(int32_t a, int16x8_t b, int16x8_t c) {
182 #ifdef POLYMORPHIC
183   return vmlsdavaxq(a, b, c);
184 #else
185   return vmlsdavaxq_s16(a, b, c);
186 #endif
187 }
188 
189 // CHECK-LABEL: @test_vmlsdavaxq_s32(
190 // CHECK-NEXT:  entry:
191 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 0, i32 1, i32 1, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]])
192 // CHECK-NEXT:    ret i32 [[TMP0]]
193 //
test_vmlsdavaxq_s32(int32_t a,int32x4_t b,int32x4_t c)194 int32_t test_vmlsdavaxq_s32(int32_t a, int32x4_t b, int32x4_t c) {
195 #ifdef POLYMORPHIC
196   return vmlsdavaxq(a, b, c);
197 #else
198   return vmlsdavaxq_s32(a, b, c);
199 #endif
200 }
201 
202 // CHECK-LABEL: @test_vmladavaq_p_s8(
203 // CHECK-NEXT:  entry:
204 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
205 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
206 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 0, i32 0, i32 0, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]], <16 x i1> [[TMP1]])
207 // CHECK-NEXT:    ret i32 [[TMP2]]
208 //
test_vmladavaq_p_s8(int32_t a,int8x16_t b,int8x16_t c,mve_pred16_t p)209 int32_t test_vmladavaq_p_s8(int32_t a, int8x16_t b, int8x16_t c, mve_pred16_t p) {
210 #ifdef POLYMORPHIC
211   return vmladavaq_p(a, b, c, p);
212 #else
213   return vmladavaq_p_s8(a, b, c, p);
214 #endif
215 }
216 
217 // CHECK-LABEL: @test_vmladavaq_p_s16(
218 // CHECK-NEXT:  entry:
219 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
220 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
221 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 0, i32 0, i32 0, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]], <8 x i1> [[TMP1]])
222 // CHECK-NEXT:    ret i32 [[TMP2]]
223 //
test_vmladavaq_p_s16(int32_t a,int16x8_t b,int16x8_t c,mve_pred16_t p)224 int32_t test_vmladavaq_p_s16(int32_t a, int16x8_t b, int16x8_t c, mve_pred16_t p) {
225 #ifdef POLYMORPHIC
226   return vmladavaq_p(a, b, c, p);
227 #else
228   return vmladavaq_p_s16(a, b, c, p);
229 #endif
230 }
231 
232 // CHECK-LABEL: @test_vmladavaq_p_s32(
233 // CHECK-NEXT:  entry:
234 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
235 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
236 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 0, i32 0, i32 0, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]], <4 x i1> [[TMP1]])
237 // CHECK-NEXT:    ret i32 [[TMP2]]
238 //
test_vmladavaq_p_s32(int32_t a,int32x4_t b,int32x4_t c,mve_pred16_t p)239 int32_t test_vmladavaq_p_s32(int32_t a, int32x4_t b, int32x4_t c, mve_pred16_t p) {
240 #ifdef POLYMORPHIC
241   return vmladavaq_p(a, b, c, p);
242 #else
243   return vmladavaq_p_s32(a, b, c, p);
244 #endif
245 }
246 
247 // CHECK-LABEL: @test_vmladavaq_p_u8(
248 // CHECK-NEXT:  entry:
249 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
250 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
251 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 1, i32 0, i32 0, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]], <16 x i1> [[TMP1]])
252 // CHECK-NEXT:    ret i32 [[TMP2]]
253 //
test_vmladavaq_p_u8(uint32_t a,uint8x16_t b,uint8x16_t c,mve_pred16_t p)254 uint32_t test_vmladavaq_p_u8(uint32_t a, uint8x16_t b, uint8x16_t c, mve_pred16_t p) {
255 #ifdef POLYMORPHIC
256   return vmladavaq_p(a, b, c, p);
257 #else
258   return vmladavaq_p_u8(a, b, c, p);
259 #endif
260 }
261 
262 // CHECK-LABEL: @test_vmladavaq_p_u16(
263 // CHECK-NEXT:  entry:
264 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
265 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
266 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 1, i32 0, i32 0, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]], <8 x i1> [[TMP1]])
267 // CHECK-NEXT:    ret i32 [[TMP2]]
268 //
test_vmladavaq_p_u16(uint32_t a,uint16x8_t b,uint16x8_t c,mve_pred16_t p)269 uint32_t test_vmladavaq_p_u16(uint32_t a, uint16x8_t b, uint16x8_t c, mve_pred16_t p) {
270 #ifdef POLYMORPHIC
271   return vmladavaq_p(a, b, c, p);
272 #else
273   return vmladavaq_p_u16(a, b, c, p);
274 #endif
275 }
276 
277 // CHECK-LABEL: @test_vmladavaq_p_u32(
278 // CHECK-NEXT:  entry:
279 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
280 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
281 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 1, i32 0, i32 0, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]], <4 x i1> [[TMP1]])
282 // CHECK-NEXT:    ret i32 [[TMP2]]
283 //
test_vmladavaq_p_u32(uint32_t a,uint32x4_t b,uint32x4_t c,mve_pred16_t p)284 uint32_t test_vmladavaq_p_u32(uint32_t a, uint32x4_t b, uint32x4_t c, mve_pred16_t p) {
285 #ifdef POLYMORPHIC
286   return vmladavaq_p(a, b, c, p);
287 #else
288   return vmladavaq_p_u32(a, b, c, p);
289 #endif
290 }
291 
292 // CHECK-LABEL: @test_vmladavaxq_p_s8(
293 // CHECK-NEXT:  entry:
294 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
295 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
296 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 0, i32 0, i32 1, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]], <16 x i1> [[TMP1]])
297 // CHECK-NEXT:    ret i32 [[TMP2]]
298 //
test_vmladavaxq_p_s8(int32_t a,int8x16_t b,int8x16_t c,mve_pred16_t p)299 int32_t test_vmladavaxq_p_s8(int32_t a, int8x16_t b, int8x16_t c, mve_pred16_t p) {
300 #ifdef POLYMORPHIC
301   return vmladavaxq_p(a, b, c, p);
302 #else
303   return vmladavaxq_p_s8(a, b, c, p);
304 #endif
305 }
306 
307 // CHECK-LABEL: @test_vmladavaxq_p_s16(
308 // CHECK-NEXT:  entry:
309 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
310 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
311 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 0, i32 0, i32 1, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]], <8 x i1> [[TMP1]])
312 // CHECK-NEXT:    ret i32 [[TMP2]]
313 //
test_vmladavaxq_p_s16(int32_t a,int16x8_t b,int16x8_t c,mve_pred16_t p)314 int32_t test_vmladavaxq_p_s16(int32_t a, int16x8_t b, int16x8_t c, mve_pred16_t p) {
315 #ifdef POLYMORPHIC
316   return vmladavaxq_p(a, b, c, p);
317 #else
318   return vmladavaxq_p_s16(a, b, c, p);
319 #endif
320 }
321 
322 // CHECK-LABEL: @test_vmladavaxq_p_s32(
323 // CHECK-NEXT:  entry:
324 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
325 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
326 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 0, i32 0, i32 1, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]], <4 x i1> [[TMP1]])
327 // CHECK-NEXT:    ret i32 [[TMP2]]
328 //
test_vmladavaxq_p_s32(int32_t a,int32x4_t b,int32x4_t c,mve_pred16_t p)329 int32_t test_vmladavaxq_p_s32(int32_t a, int32x4_t b, int32x4_t c, mve_pred16_t p) {
330 #ifdef POLYMORPHIC
331   return vmladavaxq_p(a, b, c, p);
332 #else
333   return vmladavaxq_p_s32(a, b, c, p);
334 #endif
335 }
336 
337 // CHECK-LABEL: @test_vmlsdavaq_p_s8(
338 // CHECK-NEXT:  entry:
339 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
340 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
341 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 0, i32 1, i32 0, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]], <16 x i1> [[TMP1]])
342 // CHECK-NEXT:    ret i32 [[TMP2]]
343 //
test_vmlsdavaq_p_s8(int32_t a,int8x16_t b,int8x16_t c,mve_pred16_t p)344 int32_t test_vmlsdavaq_p_s8(int32_t a, int8x16_t b, int8x16_t c, mve_pred16_t p) {
345 #ifdef POLYMORPHIC
346   return vmlsdavaq_p(a, b, c, p);
347 #else
348   return vmlsdavaq_p_s8(a, b, c, p);
349 #endif
350 }
351 
352 // CHECK-LABEL: @test_vmlsdavaq_p_s16(
353 // CHECK-NEXT:  entry:
354 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
355 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
356 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 0, i32 1, i32 0, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]], <8 x i1> [[TMP1]])
357 // CHECK-NEXT:    ret i32 [[TMP2]]
358 //
test_vmlsdavaq_p_s16(int32_t a,int16x8_t b,int16x8_t c,mve_pred16_t p)359 int32_t test_vmlsdavaq_p_s16(int32_t a, int16x8_t b, int16x8_t c, mve_pred16_t p) {
360 #ifdef POLYMORPHIC
361   return vmlsdavaq_p(a, b, c, p);
362 #else
363   return vmlsdavaq_p_s16(a, b, c, p);
364 #endif
365 }
366 
367 // CHECK-LABEL: @test_vmlsdavaq_p_s32(
368 // CHECK-NEXT:  entry:
369 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
370 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
371 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 0, i32 1, i32 0, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]], <4 x i1> [[TMP1]])
372 // CHECK-NEXT:    ret i32 [[TMP2]]
373 //
test_vmlsdavaq_p_s32(int32_t a,int32x4_t b,int32x4_t c,mve_pred16_t p)374 int32_t test_vmlsdavaq_p_s32(int32_t a, int32x4_t b, int32x4_t c, mve_pred16_t p) {
375 #ifdef POLYMORPHIC
376   return vmlsdavaq_p(a, b, c, p);
377 #else
378   return vmlsdavaq_p_s32(a, b, c, p);
379 #endif
380 }
381 
382 // CHECK-LABEL: @test_vmlsdavaxq_p_s8(
383 // CHECK-NEXT:  entry:
384 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
385 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
386 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 0, i32 1, i32 1, i32 [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i8> [[C:%.*]], <16 x i1> [[TMP1]])
387 // CHECK-NEXT:    ret i32 [[TMP2]]
388 //
test_vmlsdavaxq_p_s8(int32_t a,int8x16_t b,int8x16_t c,mve_pred16_t p)389 int32_t test_vmlsdavaxq_p_s8(int32_t a, int8x16_t b, int8x16_t c, mve_pred16_t p) {
390 #ifdef POLYMORPHIC
391   return vmlsdavaxq_p(a, b, c, p);
392 #else
393   return vmlsdavaxq_p_s8(a, b, c, p);
394 #endif
395 }
396 
397 // CHECK-LABEL: @test_vmlsdavaxq_p_s16(
398 // CHECK-NEXT:  entry:
399 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
400 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
401 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 0, i32 1, i32 1, i32 [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i16> [[C:%.*]], <8 x i1> [[TMP1]])
402 // CHECK-NEXT:    ret i32 [[TMP2]]
403 //
test_vmlsdavaxq_p_s16(int32_t a,int16x8_t b,int16x8_t c,mve_pred16_t p)404 int32_t test_vmlsdavaxq_p_s16(int32_t a, int16x8_t b, int16x8_t c, mve_pred16_t p) {
405 #ifdef POLYMORPHIC
406   return vmlsdavaxq_p(a, b, c, p);
407 #else
408   return vmlsdavaxq_p_s16(a, b, c, p);
409 #endif
410 }
411 
412 // CHECK-LABEL: @test_vmlsdavaxq_p_s32(
413 // CHECK-NEXT:  entry:
414 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
415 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
416 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 0, i32 1, i32 1, i32 [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i32> [[C:%.*]], <4 x i1> [[TMP1]])
417 // CHECK-NEXT:    ret i32 [[TMP2]]
418 //
test_vmlsdavaxq_p_s32(int32_t a,int32x4_t b,int32x4_t c,mve_pred16_t p)419 int32_t test_vmlsdavaxq_p_s32(int32_t a, int32x4_t b, int32x4_t c, mve_pred16_t p) {
420 #ifdef POLYMORPHIC
421   return vmlsdavaxq_p(a, b, c, p);
422 #else
423   return vmlsdavaxq_p_s32(a, b, c, p);
424 #endif
425 }
426 
427 // CHECK-LABEL: @test_vmladavq_s8(
428 // CHECK-NEXT:  entry:
429 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 0, i32 0, i32 0, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]])
430 // CHECK-NEXT:    ret i32 [[TMP0]]
431 //
test_vmladavq_s8(int8x16_t a,int8x16_t b)432 int32_t test_vmladavq_s8(int8x16_t a, int8x16_t b) {
433 #ifdef POLYMORPHIC
434   return vmladavq(a, b);
435 #else
436   return vmladavq_s8(a, b);
437 #endif
438 }
439 
440 // CHECK-LABEL: @test_vmladavq_s16(
441 // CHECK-NEXT:  entry:
442 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 0, i32 0, i32 0, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]])
443 // CHECK-NEXT:    ret i32 [[TMP0]]
444 //
test_vmladavq_s16(int16x8_t a,int16x8_t b)445 int32_t test_vmladavq_s16(int16x8_t a, int16x8_t b) {
446 #ifdef POLYMORPHIC
447   return vmladavq(a, b);
448 #else
449   return vmladavq_s16(a, b);
450 #endif
451 }
452 
453 // CHECK-LABEL: @test_vmladavq_s32(
454 // CHECK-NEXT:  entry:
455 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 0, i32 0, i32 0, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]])
456 // CHECK-NEXT:    ret i32 [[TMP0]]
457 //
test_vmladavq_s32(int32x4_t a,int32x4_t b)458 int32_t test_vmladavq_s32(int32x4_t a, int32x4_t b) {
459 #ifdef POLYMORPHIC
460   return vmladavq(a, b);
461 #else
462   return vmladavq_s32(a, b);
463 #endif
464 }
465 
466 // CHECK-LABEL: @test_vmladavq_u8(
467 // CHECK-NEXT:  entry:
468 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 1, i32 0, i32 0, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]])
469 // CHECK-NEXT:    ret i32 [[TMP0]]
470 //
test_vmladavq_u8(uint8x16_t a,uint8x16_t b)471 uint32_t test_vmladavq_u8(uint8x16_t a, uint8x16_t b) {
472 #ifdef POLYMORPHIC
473   return vmladavq(a, b);
474 #else
475   return vmladavq_u8(a, b);
476 #endif
477 }
478 
479 // CHECK-LABEL: @test_vmladavq_u16(
480 // CHECK-NEXT:  entry:
481 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 1, i32 0, i32 0, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]])
482 // CHECK-NEXT:    ret i32 [[TMP0]]
483 //
test_vmladavq_u16(uint16x8_t a,uint16x8_t b)484 uint32_t test_vmladavq_u16(uint16x8_t a, uint16x8_t b) {
485 #ifdef POLYMORPHIC
486   return vmladavq(a, b);
487 #else
488   return vmladavq_u16(a, b);
489 #endif
490 }
491 
492 // CHECK-LABEL: @test_vmladavq_u32(
493 // CHECK-NEXT:  entry:
494 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 1, i32 0, i32 0, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]])
495 // CHECK-NEXT:    ret i32 [[TMP0]]
496 //
test_vmladavq_u32(uint32x4_t a,uint32x4_t b)497 uint32_t test_vmladavq_u32(uint32x4_t a, uint32x4_t b) {
498 #ifdef POLYMORPHIC
499   return vmladavq(a, b);
500 #else
501   return vmladavq_u32(a, b);
502 #endif
503 }
504 
505 // CHECK-LABEL: @test_vmladavxq_s8(
506 // CHECK-NEXT:  entry:
507 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 0, i32 0, i32 1, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]])
508 // CHECK-NEXT:    ret i32 [[TMP0]]
509 //
test_vmladavxq_s8(int8x16_t a,int8x16_t b)510 int32_t test_vmladavxq_s8(int8x16_t a, int8x16_t b) {
511 #ifdef POLYMORPHIC
512   return vmladavxq(a, b);
513 #else
514   return vmladavxq_s8(a, b);
515 #endif
516 }
517 
518 // CHECK-LABEL: @test_vmladavxq_s16(
519 // CHECK-NEXT:  entry:
520 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 0, i32 0, i32 1, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]])
521 // CHECK-NEXT:    ret i32 [[TMP0]]
522 //
test_vmladavxq_s16(int16x8_t a,int16x8_t b)523 int32_t test_vmladavxq_s16(int16x8_t a, int16x8_t b) {
524 #ifdef POLYMORPHIC
525   return vmladavxq(a, b);
526 #else
527   return vmladavxq_s16(a, b);
528 #endif
529 }
530 
531 // CHECK-LABEL: @test_vmladavxq_s32(
532 // CHECK-NEXT:  entry:
533 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 0, i32 0, i32 1, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]])
534 // CHECK-NEXT:    ret i32 [[TMP0]]
535 //
test_vmladavxq_s32(int32x4_t a,int32x4_t b)536 int32_t test_vmladavxq_s32(int32x4_t a, int32x4_t b) {
537 #ifdef POLYMORPHIC
538   return vmladavxq(a, b);
539 #else
540   return vmladavxq_s32(a, b);
541 #endif
542 }
543 
544 // CHECK-LABEL: @test_vmlsdavq_s8(
545 // CHECK-NEXT:  entry:
546 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 0, i32 1, i32 0, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]])
547 // CHECK-NEXT:    ret i32 [[TMP0]]
548 //
test_vmlsdavq_s8(int8x16_t a,int8x16_t b)549 int32_t test_vmlsdavq_s8(int8x16_t a, int8x16_t b) {
550 #ifdef POLYMORPHIC
551   return vmlsdavq(a, b);
552 #else
553   return vmlsdavq_s8(a, b);
554 #endif
555 }
556 
557 // CHECK-LABEL: @test_vmlsdavq_s16(
558 // CHECK-NEXT:  entry:
559 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 0, i32 1, i32 0, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]])
560 // CHECK-NEXT:    ret i32 [[TMP0]]
561 //
test_vmlsdavq_s16(int16x8_t a,int16x8_t b)562 int32_t test_vmlsdavq_s16(int16x8_t a, int16x8_t b) {
563 #ifdef POLYMORPHIC
564   return vmlsdavq(a, b);
565 #else
566   return vmlsdavq_s16(a, b);
567 #endif
568 }
569 
570 // CHECK-LABEL: @test_vmlsdavq_s32(
571 // CHECK-NEXT:  entry:
572 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 0, i32 1, i32 0, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]])
573 // CHECK-NEXT:    ret i32 [[TMP0]]
574 //
test_vmlsdavq_s32(int32x4_t a,int32x4_t b)575 int32_t test_vmlsdavq_s32(int32x4_t a, int32x4_t b) {
576 #ifdef POLYMORPHIC
577   return vmlsdavq(a, b);
578 #else
579   return vmlsdavq_s32(a, b);
580 #endif
581 }
582 
583 // CHECK-LABEL: @test_vmlsdavxq_s8(
584 // CHECK-NEXT:  entry:
585 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v16i8(i32 0, i32 1, i32 1, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]])
586 // CHECK-NEXT:    ret i32 [[TMP0]]
587 //
test_vmlsdavxq_s8(int8x16_t a,int8x16_t b)588 int32_t test_vmlsdavxq_s8(int8x16_t a, int8x16_t b) {
589 #ifdef POLYMORPHIC
590   return vmlsdavxq(a, b);
591 #else
592   return vmlsdavxq_s8(a, b);
593 #endif
594 }
595 
596 // CHECK-LABEL: @test_vmlsdavxq_s16(
597 // CHECK-NEXT:  entry:
598 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v8i16(i32 0, i32 1, i32 1, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]])
599 // CHECK-NEXT:    ret i32 [[TMP0]]
600 //
test_vmlsdavxq_s16(int16x8_t a,int16x8_t b)601 int32_t test_vmlsdavxq_s16(int16x8_t a, int16x8_t b) {
602 #ifdef POLYMORPHIC
603   return vmlsdavxq(a, b);
604 #else
605   return vmlsdavxq_s16(a, b);
606 #endif
607 }
608 
609 // CHECK-LABEL: @test_vmlsdavxq_s32(
610 // CHECK-NEXT:  entry:
611 // CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.arm.mve.vmldava.v4i32(i32 0, i32 1, i32 1, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]])
612 // CHECK-NEXT:    ret i32 [[TMP0]]
613 //
test_vmlsdavxq_s32(int32x4_t a,int32x4_t b)614 int32_t test_vmlsdavxq_s32(int32x4_t a, int32x4_t b) {
615 #ifdef POLYMORPHIC
616   return vmlsdavxq(a, b);
617 #else
618   return vmlsdavxq_s32(a, b);
619 #endif
620 }
621 
622 // CHECK-LABEL: @test_vmladavq_p_s8(
623 // CHECK-NEXT:  entry:
624 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
625 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
626 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 0, i32 0, i32 0, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]])
627 // CHECK-NEXT:    ret i32 [[TMP2]]
628 //
test_vmladavq_p_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)629 int32_t test_vmladavq_p_s8(int8x16_t a, int8x16_t b, mve_pred16_t p) {
630 #ifdef POLYMORPHIC
631   return vmladavq_p(a, b, p);
632 #else
633   return vmladavq_p_s8(a, b, p);
634 #endif
635 }
636 
637 // CHECK-LABEL: @test_vmladavq_p_s16(
638 // CHECK-NEXT:  entry:
639 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
640 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
641 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 0, i32 0, i32 0, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]])
642 // CHECK-NEXT:    ret i32 [[TMP2]]
643 //
test_vmladavq_p_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)644 int32_t test_vmladavq_p_s16(int16x8_t a, int16x8_t b, mve_pred16_t p) {
645 #ifdef POLYMORPHIC
646   return vmladavq_p(a, b, p);
647 #else
648   return vmladavq_p_s16(a, b, p);
649 #endif
650 }
651 
652 // CHECK-LABEL: @test_vmladavq_p_s32(
653 // CHECK-NEXT:  entry:
654 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
655 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
656 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 0, i32 0, i32 0, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]])
657 // CHECK-NEXT:    ret i32 [[TMP2]]
658 //
test_vmladavq_p_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)659 int32_t test_vmladavq_p_s32(int32x4_t a, int32x4_t b, mve_pred16_t p) {
660 #ifdef POLYMORPHIC
661   return vmladavq_p(a, b, p);
662 #else
663   return vmladavq_p_s32(a, b, p);
664 #endif
665 }
666 
667 // CHECK-LABEL: @test_vmladavq_p_u8(
668 // CHECK-NEXT:  entry:
669 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
670 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
671 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 1, i32 0, i32 0, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]])
672 // CHECK-NEXT:    ret i32 [[TMP2]]
673 //
test_vmladavq_p_u8(uint8x16_t a,uint8x16_t b,mve_pred16_t p)674 uint32_t test_vmladavq_p_u8(uint8x16_t a, uint8x16_t b, mve_pred16_t p) {
675 #ifdef POLYMORPHIC
676   return vmladavq_p(a, b, p);
677 #else
678   return vmladavq_p_u8(a, b, p);
679 #endif
680 }
681 
682 // CHECK-LABEL: @test_vmladavq_p_u16(
683 // CHECK-NEXT:  entry:
684 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
685 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
686 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 1, i32 0, i32 0, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]])
687 // CHECK-NEXT:    ret i32 [[TMP2]]
688 //
test_vmladavq_p_u16(uint16x8_t a,uint16x8_t b,mve_pred16_t p)689 uint32_t test_vmladavq_p_u16(uint16x8_t a, uint16x8_t b, mve_pred16_t p) {
690 #ifdef POLYMORPHIC
691   return vmladavq_p(a, b, p);
692 #else
693   return vmladavq_p_u16(a, b, p);
694 #endif
695 }
696 
697 // CHECK-LABEL: @test_vmladavq_p_u32(
698 // CHECK-NEXT:  entry:
699 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
700 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
701 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 1, i32 0, i32 0, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]])
702 // CHECK-NEXT:    ret i32 [[TMP2]]
703 //
test_vmladavq_p_u32(uint32x4_t a,uint32x4_t b,mve_pred16_t p)704 uint32_t test_vmladavq_p_u32(uint32x4_t a, uint32x4_t b, mve_pred16_t p) {
705 #ifdef POLYMORPHIC
706   return vmladavq_p(a, b, p);
707 #else
708   return vmladavq_p_u32(a, b, p);
709 #endif
710 }
711 
712 // CHECK-LABEL: @test_vmladavxq_p_s8(
713 // CHECK-NEXT:  entry:
714 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
715 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
716 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 0, i32 0, i32 1, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]])
717 // CHECK-NEXT:    ret i32 [[TMP2]]
718 //
test_vmladavxq_p_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)719 int32_t test_vmladavxq_p_s8(int8x16_t a, int8x16_t b, mve_pred16_t p) {
720 #ifdef POLYMORPHIC
721   return vmladavxq_p(a, b, p);
722 #else
723   return vmladavxq_p_s8(a, b, p);
724 #endif
725 }
726 
727 // CHECK-LABEL: @test_vmladavxq_p_s16(
728 // CHECK-NEXT:  entry:
729 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
730 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
731 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 0, i32 0, i32 1, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]])
732 // CHECK-NEXT:    ret i32 [[TMP2]]
733 //
test_vmladavxq_p_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)734 int32_t test_vmladavxq_p_s16(int16x8_t a, int16x8_t b, mve_pred16_t p) {
735 #ifdef POLYMORPHIC
736   return vmladavxq_p(a, b, p);
737 #else
738   return vmladavxq_p_s16(a, b, p);
739 #endif
740 }
741 
742 // CHECK-LABEL: @test_vmladavxq_p_s32(
743 // CHECK-NEXT:  entry:
744 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
745 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
746 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 0, i32 0, i32 1, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]])
747 // CHECK-NEXT:    ret i32 [[TMP2]]
748 //
test_vmladavxq_p_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)749 int32_t test_vmladavxq_p_s32(int32x4_t a, int32x4_t b, mve_pred16_t p) {
750 #ifdef POLYMORPHIC
751   return vmladavxq_p(a, b, p);
752 #else
753   return vmladavxq_p_s32(a, b, p);
754 #endif
755 }
756 
757 // CHECK-LABEL: @test_vmlsdavq_p_s8(
758 // CHECK-NEXT:  entry:
759 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
760 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
761 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 0, i32 1, i32 0, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]])
762 // CHECK-NEXT:    ret i32 [[TMP2]]
763 //
test_vmlsdavq_p_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)764 int32_t test_vmlsdavq_p_s8(int8x16_t a, int8x16_t b, mve_pred16_t p) {
765 #ifdef POLYMORPHIC
766   return vmlsdavq_p(a, b, p);
767 #else
768   return vmlsdavq_p_s8(a, b, p);
769 #endif
770 }
771 
772 // CHECK-LABEL: @test_vmlsdavq_p_s16(
773 // CHECK-NEXT:  entry:
774 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
775 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
776 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 0, i32 1, i32 0, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]])
777 // CHECK-NEXT:    ret i32 [[TMP2]]
778 //
test_vmlsdavq_p_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)779 int32_t test_vmlsdavq_p_s16(int16x8_t a, int16x8_t b, mve_pred16_t p) {
780 #ifdef POLYMORPHIC
781   return vmlsdavq_p(a, b, p);
782 #else
783   return vmlsdavq_p_s16(a, b, p);
784 #endif
785 }
786 
787 // CHECK-LABEL: @test_vmlsdavq_p_s32(
788 // CHECK-NEXT:  entry:
789 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
790 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
791 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 0, i32 1, i32 0, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]])
792 // CHECK-NEXT:    ret i32 [[TMP2]]
793 //
test_vmlsdavq_p_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)794 int32_t test_vmlsdavq_p_s32(int32x4_t a, int32x4_t b, mve_pred16_t p) {
795 #ifdef POLYMORPHIC
796   return vmlsdavq_p(a, b, p);
797 #else
798   return vmlsdavq_p_s32(a, b, p);
799 #endif
800 }
801 
802 // CHECK-LABEL: @test_vmlsdavxq_p_s8(
803 // CHECK-NEXT:  entry:
804 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
805 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
806 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v16i8.v16i1(i32 0, i32 1, i32 1, i32 0, <16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]])
807 // CHECK-NEXT:    ret i32 [[TMP2]]
808 //
test_vmlsdavxq_p_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)809 int32_t test_vmlsdavxq_p_s8(int8x16_t a, int8x16_t b, mve_pred16_t p) {
810 #ifdef POLYMORPHIC
811   return vmlsdavxq_p(a, b, p);
812 #else
813   return vmlsdavxq_p_s8(a, b, p);
814 #endif
815 }
816 
817 // CHECK-LABEL: @test_vmlsdavxq_p_s16(
818 // CHECK-NEXT:  entry:
819 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
820 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
821 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v8i16.v8i1(i32 0, i32 1, i32 1, i32 0, <8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]])
822 // CHECK-NEXT:    ret i32 [[TMP2]]
823 //
test_vmlsdavxq_p_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)824 int32_t test_vmlsdavxq_p_s16(int16x8_t a, int16x8_t b, mve_pred16_t p) {
825 #ifdef POLYMORPHIC
826   return vmlsdavxq_p(a, b, p);
827 #else
828   return vmlsdavxq_p_s16(a, b, p);
829 #endif
830 }
831 
832 // CHECK-LABEL: @test_vmlsdavxq_p_s32(
833 // CHECK-NEXT:  entry:
834 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
835 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
836 // CHECK-NEXT:    [[TMP2:%.*]] = call i32 @llvm.arm.mve.vmldava.predicated.v4i32.v4i1(i32 0, i32 1, i32 1, i32 0, <4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]])
837 // CHECK-NEXT:    ret i32 [[TMP2]]
838 //
test_vmlsdavxq_p_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)839 int32_t test_vmlsdavxq_p_s32(int32x4_t a, int32x4_t b, mve_pred16_t p) {
840 #ifdef POLYMORPHIC
841   return vmlsdavxq_p(a, b, p);
842 #else
843   return vmlsdavxq_p_s32(a, b, p);
844 #endif
845 }
846