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 -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 -sroa | FileCheck %s
4 
5 #include <arm_mve.h>
6 
7 // CHECK-LABEL: @test_vfmaq_f16(
8 // CHECK-NEXT:  entry:
9 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x half> @llvm.fma.v8f16(<8 x half> [[B:%.*]], <8 x half> [[C:%.*]], <8 x half> [[A:%.*]])
10 // CHECK-NEXT:    ret <8 x half> [[TMP0]]
11 //
test_vfmaq_f16(float16x8_t a,float16x8_t b,float16x8_t c)12 float16x8_t test_vfmaq_f16(float16x8_t a, float16x8_t b, float16x8_t c) {
13 #ifdef POLYMORPHIC
14   return vfmaq(a, b, c);
15 #else /* POLYMORPHIC */
16   return vfmaq_f16(a, b, c);
17 #endif /* POLYMORPHIC */
18 }
19 
20 // CHECK-LABEL: @test_vfmaq_f32(
21 // CHECK-NEXT:  entry:
22 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> [[B:%.*]], <4 x float> [[C:%.*]], <4 x float> [[A:%.*]])
23 // CHECK-NEXT:    ret <4 x float> [[TMP0]]
24 //
test_vfmaq_f32(float32x4_t a,float32x4_t b,float32x4_t c)25 float32x4_t test_vfmaq_f32(float32x4_t a, float32x4_t b, float32x4_t c) {
26 #ifdef POLYMORPHIC
27   return vfmaq(a, b, c);
28 #else /* POLYMORPHIC */
29   return vfmaq_f32(a, b, c);
30 #endif /* POLYMORPHIC */
31 }
32 
33 // CHECK-LABEL: @test_vfmaq_n_f16(
34 // CHECK-NEXT:  entry:
35 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[C:%.*]], i32 0
36 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
37 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x half> @llvm.fma.v8f16(<8 x half> [[B:%.*]], <8 x half> [[DOTSPLAT]], <8 x half> [[A:%.*]])
38 // CHECK-NEXT:    ret <8 x half> [[TMP0]]
39 //
test_vfmaq_n_f16(float16x8_t a,float16x8_t b,float16_t c)40 float16x8_t test_vfmaq_n_f16(float16x8_t a, float16x8_t b, float16_t c) {
41 #ifdef POLYMORPHIC
42   return vfmaq(a, b, c);
43 #else /* POLYMORPHIC */
44   return vfmaq_n_f16(a, b, c);
45 #endif /* POLYMORPHIC */
46 }
47 
48 // CHECK-LABEL: @test_vfmaq_n_f32(
49 // CHECK-NEXT:  entry:
50 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[C:%.*]], i32 0
51 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
52 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> [[B:%.*]], <4 x float> [[DOTSPLAT]], <4 x float> [[A:%.*]])
53 // CHECK-NEXT:    ret <4 x float> [[TMP0]]
54 //
test_vfmaq_n_f32(float32x4_t a,float32x4_t b,float32_t c)55 float32x4_t test_vfmaq_n_f32(float32x4_t a, float32x4_t b, float32_t c) {
56 #ifdef POLYMORPHIC
57   return vfmaq(a, b, c);
58 #else /* POLYMORPHIC */
59   return vfmaq_n_f32(a, b, c);
60 #endif /* POLYMORPHIC */
61 }
62 
63 // CHECK-LABEL: @test_vfmasq_n_f16(
64 // CHECK-NEXT:  entry:
65 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[C:%.*]], i32 0
66 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
67 // CHECK-NEXT:    [[TMP0:%.*]] = call <8 x half> @llvm.fma.v8f16(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], <8 x half> [[DOTSPLAT]])
68 // CHECK-NEXT:    ret <8 x half> [[TMP0]]
69 //
test_vfmasq_n_f16(float16x8_t a,float16x8_t b,float16_t c)70 float16x8_t test_vfmasq_n_f16(float16x8_t a, float16x8_t b, float16_t c) {
71 #ifdef POLYMORPHIC
72   return vfmasq(a, b, c);
73 #else /* POLYMORPHIC */
74   return vfmasq_n_f16(a, b, c);
75 #endif /* POLYMORPHIC */
76 }
77 
78 // CHECK-LABEL: @test_vfmasq_n_f32(
79 // CHECK-NEXT:  entry:
80 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[C:%.*]], i32 0
81 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
82 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], <4 x float> [[DOTSPLAT]])
83 // CHECK-NEXT:    ret <4 x float> [[TMP0]]
84 //
test_vfmasq_n_f32(float32x4_t a,float32x4_t b,float32_t c)85 float32x4_t test_vfmasq_n_f32(float32x4_t a, float32x4_t b, float32_t c) {
86 #ifdef POLYMORPHIC
87   return vfmasq(a, b, c);
88 #else /* POLYMORPHIC */
89   return vfmasq_n_f32(a, b, c);
90 #endif /* POLYMORPHIC */
91 }
92 
93 // CHECK-LABEL: @test_vfmsq_f16(
94 // CHECK-NEXT:  entry:
95 // CHECK-NEXT:    [[TMP0:%.*]] = fneg <8 x half> [[C:%.*]]
96 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x half> @llvm.fma.v8f16(<8 x half> [[B:%.*]], <8 x half> [[TMP0]], <8 x half> [[A:%.*]])
97 // CHECK-NEXT:    ret <8 x half> [[TMP1]]
98 //
test_vfmsq_f16(float16x8_t a,float16x8_t b,float16x8_t c)99 float16x8_t test_vfmsq_f16(float16x8_t a, float16x8_t b, float16x8_t c) {
100 #ifdef POLYMORPHIC
101   return vfmsq(a, b, c);
102 #else /* POLYMORPHIC */
103   return vfmsq_f16(a, b, c);
104 #endif /* POLYMORPHIC */
105 }
106 
107 // CHECK-LABEL: @test_vfmsq_f32(
108 // CHECK-NEXT:  entry:
109 // CHECK-NEXT:    [[TMP0:%.*]] = fneg <4 x float> [[C:%.*]]
110 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> [[B:%.*]], <4 x float> [[TMP0]], <4 x float> [[A:%.*]])
111 // CHECK-NEXT:    ret <4 x float> [[TMP1]]
112 //
test_vfmsq_f32(float32x4_t a,float32x4_t b,float32x4_t c)113 float32x4_t test_vfmsq_f32(float32x4_t a, float32x4_t b, float32x4_t c) {
114 #ifdef POLYMORPHIC
115   return vfmsq(a, b, c);
116 #else /* POLYMORPHIC */
117   return vfmsq_f32(a, b, c);
118 #endif /* POLYMORPHIC */
119 }
120 
121 // CHECK-LABEL: @test_vmlaq_n_s8(
122 // CHECK-NEXT:  entry:
123 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[C:%.*]], i32 0
124 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
125 // CHECK-NEXT:    [[TMP0:%.*]] = mul <16 x i8> [[B:%.*]], [[DOTSPLAT]]
126 // CHECK-NEXT:    [[TMP1:%.*]] = add <16 x i8> [[TMP0]], [[A:%.*]]
127 // CHECK-NEXT:    ret <16 x i8> [[TMP1]]
128 //
test_vmlaq_n_s8(int8x16_t a,int8x16_t b,int8_t c)129 int8x16_t test_vmlaq_n_s8(int8x16_t a, int8x16_t b, int8_t c) {
130 #ifdef POLYMORPHIC
131   return vmlaq(a, b, c);
132 #else  /* POLYMORPHIC */
133   return vmlaq_n_s8(a, b, c);
134 #endif /* POLYMORPHIC */
135 }
136 
137 // CHECK-LABEL: @test_vmlaq_n_s16(
138 // CHECK-NEXT:  entry:
139 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[C:%.*]], i32 0
140 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
141 // CHECK-NEXT:    [[TMP0:%.*]] = mul <8 x i16> [[B:%.*]], [[DOTSPLAT]]
142 // CHECK-NEXT:    [[TMP1:%.*]] = add <8 x i16> [[TMP0]], [[A:%.*]]
143 // CHECK-NEXT:    ret <8 x i16> [[TMP1]]
144 //
test_vmlaq_n_s16(int16x8_t a,int16x8_t b,int16_t c)145 int16x8_t test_vmlaq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
146 #ifdef POLYMORPHIC
147   return vmlaq(a, b, c);
148 #else  /* POLYMORPHIC */
149   return vmlaq_n_s16(a, b, c);
150 #endif /* POLYMORPHIC */
151 }
152 
153 // CHECK-LABEL: @test_vmlaq_n_s32(
154 // CHECK-NEXT:  entry:
155 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[C:%.*]], i32 0
156 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
157 // CHECK-NEXT:    [[TMP0:%.*]] = mul <4 x i32> [[B:%.*]], [[DOTSPLAT]]
158 // CHECK-NEXT:    [[TMP1:%.*]] = add <4 x i32> [[TMP0]], [[A:%.*]]
159 // CHECK-NEXT:    ret <4 x i32> [[TMP1]]
160 //
test_vmlaq_n_s32(int32x4_t a,int32x4_t b,int32_t c)161 int32x4_t test_vmlaq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
162 #ifdef POLYMORPHIC
163   return vmlaq(a, b, c);
164 #else  /* POLYMORPHIC */
165   return vmlaq_n_s32(a, b, c);
166 #endif /* POLYMORPHIC */
167 }
168 
169 // CHECK-LABEL: @test_vmlaq_n_u8(
170 // CHECK-NEXT:  entry:
171 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[C:%.*]], i32 0
172 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
173 // CHECK-NEXT:    [[TMP0:%.*]] = mul <16 x i8> [[B:%.*]], [[DOTSPLAT]]
174 // CHECK-NEXT:    [[TMP1:%.*]] = add <16 x i8> [[TMP0]], [[A:%.*]]
175 // CHECK-NEXT:    ret <16 x i8> [[TMP1]]
176 //
test_vmlaq_n_u8(uint8x16_t a,uint8x16_t b,uint8_t c)177 uint8x16_t test_vmlaq_n_u8(uint8x16_t a, uint8x16_t b, uint8_t c) {
178 #ifdef POLYMORPHIC
179   return vmlaq(a, b, c);
180 #else  /* POLYMORPHIC */
181   return vmlaq_n_u8(a, b, c);
182 #endif /* POLYMORPHIC */
183 }
184 
185 // CHECK-LABEL: @test_vmlaq_n_u16(
186 // CHECK-NEXT:  entry:
187 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[C:%.*]], i32 0
188 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
189 // CHECK-NEXT:    [[TMP0:%.*]] = mul <8 x i16> [[B:%.*]], [[DOTSPLAT]]
190 // CHECK-NEXT:    [[TMP1:%.*]] = add <8 x i16> [[TMP0]], [[A:%.*]]
191 // CHECK-NEXT:    ret <8 x i16> [[TMP1]]
192 //
test_vmlaq_n_u16(uint16x8_t a,uint16x8_t b,uint16_t c)193 uint16x8_t test_vmlaq_n_u16(uint16x8_t a, uint16x8_t b, uint16_t c) {
194 #ifdef POLYMORPHIC
195   return vmlaq(a, b, c);
196 #else  /* POLYMORPHIC */
197   return vmlaq_n_u16(a, b, c);
198 #endif /* POLYMORPHIC */
199 }
200 
201 // CHECK-LABEL: @test_vmlaq_n_u32(
202 // CHECK-NEXT:  entry:
203 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[C:%.*]], i32 0
204 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
205 // CHECK-NEXT:    [[TMP0:%.*]] = mul <4 x i32> [[B:%.*]], [[DOTSPLAT]]
206 // CHECK-NEXT:    [[TMP1:%.*]] = add <4 x i32> [[TMP0]], [[A:%.*]]
207 // CHECK-NEXT:    ret <4 x i32> [[TMP1]]
208 //
test_vmlaq_n_u32(uint32x4_t a,uint32x4_t b,uint32_t c)209 uint32x4_t test_vmlaq_n_u32(uint32x4_t a, uint32x4_t b, uint32_t c) {
210 #ifdef POLYMORPHIC
211   return vmlaq(a, b, c);
212 #else  /* POLYMORPHIC */
213   return vmlaq_n_u32(a, b, c);
214 #endif /* POLYMORPHIC */
215 }
216 
217 // CHECK-LABEL: @test_vmlasq_n_s8(
218 // CHECK-NEXT:  entry:
219 // CHECK-NEXT:    [[TMP0:%.*]] = mul <16 x i8> [[A:%.*]], [[B:%.*]]
220 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[C:%.*]], i32 0
221 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
222 // CHECK-NEXT:    [[TMP1:%.*]] = add <16 x i8> [[TMP0]], [[DOTSPLAT]]
223 // CHECK-NEXT:    ret <16 x i8> [[TMP1]]
224 //
test_vmlasq_n_s8(int8x16_t a,int8x16_t b,int8_t c)225 int8x16_t test_vmlasq_n_s8(int8x16_t a, int8x16_t b, int8_t c) {
226 #ifdef POLYMORPHIC
227   return vmlasq(a, b, c);
228 #else  /* POLYMORPHIC */
229   return vmlasq_n_s8(a, b, c);
230 #endif /* POLYMORPHIC */
231 }
232 
233 // CHECK-LABEL: @test_vmlasq_n_s16(
234 // CHECK-NEXT:  entry:
235 // CHECK-NEXT:    [[TMP0:%.*]] = mul <8 x i16> [[A:%.*]], [[B:%.*]]
236 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[C:%.*]], i32 0
237 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
238 // CHECK-NEXT:    [[TMP1:%.*]] = add <8 x i16> [[TMP0]], [[DOTSPLAT]]
239 // CHECK-NEXT:    ret <8 x i16> [[TMP1]]
240 //
test_vmlasq_n_s16(int16x8_t a,int16x8_t b,int16_t c)241 int16x8_t test_vmlasq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
242 #ifdef POLYMORPHIC
243   return vmlasq(a, b, c);
244 #else  /* POLYMORPHIC */
245   return vmlasq_n_s16(a, b, c);
246 #endif /* POLYMORPHIC */
247 }
248 
249 // CHECK-LABEL: @test_vmlasq_n_s32(
250 // CHECK-NEXT:  entry:
251 // CHECK-NEXT:    [[TMP0:%.*]] = mul <4 x i32> [[A:%.*]], [[B:%.*]]
252 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[C:%.*]], i32 0
253 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
254 // CHECK-NEXT:    [[TMP1:%.*]] = add <4 x i32> [[TMP0]], [[DOTSPLAT]]
255 // CHECK-NEXT:    ret <4 x i32> [[TMP1]]
256 //
test_vmlasq_n_s32(int32x4_t a,int32x4_t b,int32_t c)257 int32x4_t test_vmlasq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
258 #ifdef POLYMORPHIC
259   return vmlasq(a, b, c);
260 #else  /* POLYMORPHIC */
261   return vmlasq_n_s32(a, b, c);
262 #endif /* POLYMORPHIC */
263 }
264 
265 // CHECK-LABEL: @test_vmlasq_n_u8(
266 // CHECK-NEXT:  entry:
267 // CHECK-NEXT:    [[TMP0:%.*]] = mul <16 x i8> [[A:%.*]], [[B:%.*]]
268 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[C:%.*]], i32 0
269 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
270 // CHECK-NEXT:    [[TMP1:%.*]] = add <16 x i8> [[TMP0]], [[DOTSPLAT]]
271 // CHECK-NEXT:    ret <16 x i8> [[TMP1]]
272 //
test_vmlasq_n_u8(uint8x16_t a,uint8x16_t b,uint8_t c)273 uint8x16_t test_vmlasq_n_u8(uint8x16_t a, uint8x16_t b, uint8_t c) {
274 #ifdef POLYMORPHIC
275   return vmlasq(a, b, c);
276 #else  /* POLYMORPHIC */
277   return vmlasq_n_u8(a, b, c);
278 #endif /* POLYMORPHIC */
279 }
280 
281 // CHECK-LABEL: @test_vmlasq_n_u16(
282 // CHECK-NEXT:  entry:
283 // CHECK-NEXT:    [[TMP0:%.*]] = mul <8 x i16> [[A:%.*]], [[B:%.*]]
284 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[C:%.*]], i32 0
285 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
286 // CHECK-NEXT:    [[TMP1:%.*]] = add <8 x i16> [[TMP0]], [[DOTSPLAT]]
287 // CHECK-NEXT:    ret <8 x i16> [[TMP1]]
288 //
test_vmlasq_n_u16(uint16x8_t a,uint16x8_t b,uint16_t c)289 uint16x8_t test_vmlasq_n_u16(uint16x8_t a, uint16x8_t b, uint16_t c) {
290 #ifdef POLYMORPHIC
291   return vmlasq(a, b, c);
292 #else  /* POLYMORPHIC */
293   return vmlasq_n_u16(a, b, c);
294 #endif /* POLYMORPHIC */
295 }
296 
297 // CHECK-LABEL: @test_vmlasq_n_u32(
298 // CHECK-NEXT:  entry:
299 // CHECK-NEXT:    [[TMP0:%.*]] = mul <4 x i32> [[A:%.*]], [[B:%.*]]
300 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[C:%.*]], i32 0
301 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
302 // CHECK-NEXT:    [[TMP1:%.*]] = add <4 x i32> [[TMP0]], [[DOTSPLAT]]
303 // CHECK-NEXT:    ret <4 x i32> [[TMP1]]
304 //
test_vmlasq_n_u32(uint32x4_t a,uint32x4_t b,uint32_t c)305 uint32x4_t test_vmlasq_n_u32(uint32x4_t a, uint32x4_t b, uint32_t c) {
306 #ifdef POLYMORPHIC
307   return vmlasq(a, b, c);
308 #else  /* POLYMORPHIC */
309   return vmlasq_n_u32(a, b, c);
310 #endif /* POLYMORPHIC */
311 }
312 
313 // CHECK-LABEL: @test_vqdmlahq_n_s8(
314 // CHECK-NEXT:  entry:
315 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
316 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i8> @llvm.arm.mve.vqdmlah.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]])
317 // CHECK-NEXT:    ret <16 x i8> [[TMP1]]
318 //
test_vqdmlahq_n_s8(int8x16_t a,int8x16_t b,int8_t c)319 int8x16_t test_vqdmlahq_n_s8(int8x16_t a, int8x16_t b, int8_t c) {
320 #ifdef POLYMORPHIC
321   return vqdmlahq(a, b, c);
322 #else  /* POLYMORPHIC */
323   return vqdmlahq_n_s8(a, b, c);
324 #endif /* POLYMORPHIC */
325 }
326 
327 // CHECK-LABEL: @test_vqdmlahq_n_s16(
328 // CHECK-NEXT:  entry:
329 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
330 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i16> @llvm.arm.mve.vqdmlah.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]])
331 // CHECK-NEXT:    ret <8 x i16> [[TMP1]]
332 //
test_vqdmlahq_n_s16(int16x8_t a,int16x8_t b,int16_t c)333 int16x8_t test_vqdmlahq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
334 #ifdef POLYMORPHIC
335   return vqdmlahq(a, b, c);
336 #else  /* POLYMORPHIC */
337   return vqdmlahq_n_s16(a, b, c);
338 #endif /* POLYMORPHIC */
339 }
340 
341 // CHECK-LABEL: @test_vqdmlahq_n_s32(
342 // CHECK-NEXT:  entry:
343 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vqdmlah.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]])
344 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
345 //
test_vqdmlahq_n_s32(int32x4_t a,int32x4_t b,int32_t c)346 int32x4_t test_vqdmlahq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
347 #ifdef POLYMORPHIC
348   return vqdmlahq(a, b, c);
349 #else  /* POLYMORPHIC */
350   return vqdmlahq_n_s32(a, b, c);
351 #endif /* POLYMORPHIC */
352 }
353 
354 // CHECK-LABEL: @test_vqdmlashq_n_s8(
355 // CHECK-NEXT:  entry:
356 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[ADD:%.*]] to i32
357 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i8> @llvm.arm.mve.vqdmlash.v16i8(<16 x i8> [[M1:%.*]], <16 x i8> [[M2:%.*]], i32 [[TMP0]])
358 // CHECK-NEXT:    ret <16 x i8> [[TMP1]]
359 //
test_vqdmlashq_n_s8(int8x16_t m1,int8x16_t m2,int8_t add)360 int8x16_t test_vqdmlashq_n_s8(int8x16_t m1, int8x16_t m2, int8_t add) {
361 #ifdef POLYMORPHIC
362   return vqdmlashq(m1, m2, add);
363 #else  /* POLYMORPHIC */
364   return vqdmlashq_n_s8(m1, m2, add);
365 #endif /* POLYMORPHIC */
366 }
367 
368 // CHECK-LABEL: @test_vqdmlashq_n_s16(
369 // CHECK-NEXT:  entry:
370 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[ADD:%.*]] to i32
371 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i16> @llvm.arm.mve.vqdmlash.v8i16(<8 x i16> [[M1:%.*]], <8 x i16> [[M2:%.*]], i32 [[TMP0]])
372 // CHECK-NEXT:    ret <8 x i16> [[TMP1]]
373 //
test_vqdmlashq_n_s16(int16x8_t m1,int16x8_t m2,int16_t add)374 int16x8_t test_vqdmlashq_n_s16(int16x8_t m1, int16x8_t m2, int16_t add) {
375 #ifdef POLYMORPHIC
376   return vqdmlashq(m1, m2, add);
377 #else  /* POLYMORPHIC */
378   return vqdmlashq_n_s16(m1, m2, add);
379 #endif /* POLYMORPHIC */
380 }
381 
382 // CHECK-LABEL: @test_vqdmlashq_n_s32(
383 // CHECK-NEXT:  entry:
384 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vqdmlash.v4i32(<4 x i32> [[M1:%.*]], <4 x i32> [[M2:%.*]], i32 [[ADD:%.*]])
385 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
386 //
test_vqdmlashq_n_s32(int32x4_t m1,int32x4_t m2,int32_t add)387 int32x4_t test_vqdmlashq_n_s32(int32x4_t m1, int32x4_t m2, int32_t add) {
388 #ifdef POLYMORPHIC
389   return vqdmlashq(m1, m2, add);
390 #else  /* POLYMORPHIC */
391   return vqdmlashq_n_s32(m1, m2, add);
392 #endif /* POLYMORPHIC */
393 }
394 
395 // CHECK-LABEL: @test_vqrdmlahq_n_s8(
396 // CHECK-NEXT:  entry:
397 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
398 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i8> @llvm.arm.mve.vqrdmlah.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]])
399 // CHECK-NEXT:    ret <16 x i8> [[TMP1]]
400 //
test_vqrdmlahq_n_s8(int8x16_t a,int8x16_t b,int8_t c)401 int8x16_t test_vqrdmlahq_n_s8(int8x16_t a, int8x16_t b, int8_t c) {
402 #ifdef POLYMORPHIC
403   return vqrdmlahq(a, b, c);
404 #else  /* POLYMORPHIC */
405   return vqrdmlahq_n_s8(a, b, c);
406 #endif /* POLYMORPHIC */
407 }
408 
409 // CHECK-LABEL: @test_vqrdmlahq_n_s16(
410 // CHECK-NEXT:  entry:
411 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
412 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i16> @llvm.arm.mve.vqrdmlah.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]])
413 // CHECK-NEXT:    ret <8 x i16> [[TMP1]]
414 //
test_vqrdmlahq_n_s16(int16x8_t a,int16x8_t b,int16_t c)415 int16x8_t test_vqrdmlahq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
416 #ifdef POLYMORPHIC
417   return vqrdmlahq(a, b, c);
418 #else  /* POLYMORPHIC */
419   return vqrdmlahq_n_s16(a, b, c);
420 #endif /* POLYMORPHIC */
421 }
422 
423 // CHECK-LABEL: @test_vqrdmlahq_n_s32(
424 // CHECK-NEXT:  entry:
425 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vqrdmlah.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]])
426 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
427 //
test_vqrdmlahq_n_s32(int32x4_t a,int32x4_t b,int32_t c)428 int32x4_t test_vqrdmlahq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
429 #ifdef POLYMORPHIC
430   return vqrdmlahq(a, b, c);
431 #else  /* POLYMORPHIC */
432   return vqrdmlahq_n_s32(a, b, c);
433 #endif /* POLYMORPHIC */
434 }
435 
436 // CHECK-LABEL: @test_vqrdmlashq_n_s8(
437 // CHECK-NEXT:  entry:
438 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
439 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i8> @llvm.arm.mve.vqrdmlash.v16i8(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]])
440 // CHECK-NEXT:    ret <16 x i8> [[TMP1]]
441 //
test_vqrdmlashq_n_s8(int8x16_t a,int8x16_t b,int8_t c)442 int8x16_t test_vqrdmlashq_n_s8(int8x16_t a, int8x16_t b, int8_t c) {
443 #ifdef POLYMORPHIC
444   return vqrdmlashq(a, b, c);
445 #else  /* POLYMORPHIC */
446   return vqrdmlashq_n_s8(a, b, c);
447 #endif /* POLYMORPHIC */
448 }
449 
450 // CHECK-LABEL: @test_vqrdmlashq_n_s16(
451 // CHECK-NEXT:  entry:
452 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
453 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i16> @llvm.arm.mve.vqrdmlash.v8i16(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]])
454 // CHECK-NEXT:    ret <8 x i16> [[TMP1]]
455 //
test_vqrdmlashq_n_s16(int16x8_t a,int16x8_t b,int16_t c)456 int16x8_t test_vqrdmlashq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
457 #ifdef POLYMORPHIC
458   return vqrdmlashq(a, b, c);
459 #else  /* POLYMORPHIC */
460   return vqrdmlashq_n_s16(a, b, c);
461 #endif /* POLYMORPHIC */
462 }
463 
464 // CHECK-LABEL: @test_vqrdmlashq_n_s32(
465 // CHECK-NEXT:  entry:
466 // CHECK-NEXT:    [[TMP0:%.*]] = call <4 x i32> @llvm.arm.mve.vqrdmlash.v4i32(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]])
467 // CHECK-NEXT:    ret <4 x i32> [[TMP0]]
468 //
test_vqrdmlashq_n_s32(int32x4_t a,int32x4_t b,int32_t c)469 int32x4_t test_vqrdmlashq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
470 #ifdef POLYMORPHIC
471   return vqrdmlashq(a, b, c);
472 #else  /* POLYMORPHIC */
473   return vqrdmlashq_n_s32(a, b, c);
474 #endif /* POLYMORPHIC */
475 }
476 
477 // CHECK-LABEL: @test_vfmaq_m_f16(
478 // CHECK-NEXT:  entry:
479 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
480 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
481 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.fma.predicated.v8f16.v8i1(<8 x half> [[B:%.*]], <8 x half> [[C:%.*]], <8 x half> [[A:%.*]], <8 x i1> [[TMP1]])
482 // CHECK-NEXT:    ret <8 x half> [[TMP2]]
483 //
test_vfmaq_m_f16(float16x8_t a,float16x8_t b,float16x8_t c,mve_pred16_t p)484 float16x8_t test_vfmaq_m_f16(float16x8_t a, float16x8_t b, float16x8_t c, mve_pred16_t p) {
485 #ifdef POLYMORPHIC
486   return vfmaq_m(a, b, c, p);
487 #else /* POLYMORPHIC */
488   return vfmaq_m_f16(a, b, c, p);
489 #endif /* POLYMORPHIC */
490 }
491 
492 // CHECK-LABEL: @test_vfmaq_m_f32(
493 // CHECK-NEXT:  entry:
494 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
495 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
496 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.fma.predicated.v4f32.v4i1(<4 x float> [[B:%.*]], <4 x float> [[C:%.*]], <4 x float> [[A:%.*]], <4 x i1> [[TMP1]])
497 // CHECK-NEXT:    ret <4 x float> [[TMP2]]
498 //
test_vfmaq_m_f32(float32x4_t a,float32x4_t b,float32x4_t c,mve_pred16_t p)499 float32x4_t test_vfmaq_m_f32(float32x4_t a, float32x4_t b, float32x4_t c, mve_pred16_t p) {
500 #ifdef POLYMORPHIC
501   return vfmaq_m(a, b, c, p);
502 #else /* POLYMORPHIC */
503   return vfmaq_m_f32(a, b, c, p);
504 #endif /* POLYMORPHIC */
505 }
506 
507 // CHECK-LABEL: @test_vfmaq_m_n_f16(
508 // CHECK-NEXT:  entry:
509 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[C:%.*]], i32 0
510 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
511 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
512 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
513 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.fma.predicated.v8f16.v8i1(<8 x half> [[B:%.*]], <8 x half> [[DOTSPLAT]], <8 x half> [[A:%.*]], <8 x i1> [[TMP1]])
514 // CHECK-NEXT:    ret <8 x half> [[TMP2]]
515 //
test_vfmaq_m_n_f16(float16x8_t a,float16x8_t b,float16_t c,mve_pred16_t p)516 float16x8_t test_vfmaq_m_n_f16(float16x8_t a, float16x8_t b, float16_t c, mve_pred16_t p) {
517 #ifdef POLYMORPHIC
518   return vfmaq_m(a, b, c, p);
519 #else /* POLYMORPHIC */
520   return vfmaq_m_n_f16(a, b, c, p);
521 #endif /* POLYMORPHIC */
522 }
523 
524 // CHECK-LABEL: @test_vfmaq_m_n_f32(
525 // CHECK-NEXT:  entry:
526 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[C:%.*]], i32 0
527 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
528 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
529 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
530 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.fma.predicated.v4f32.v4i1(<4 x float> [[B:%.*]], <4 x float> [[DOTSPLAT]], <4 x float> [[A:%.*]], <4 x i1> [[TMP1]])
531 // CHECK-NEXT:    ret <4 x float> [[TMP2]]
532 //
test_vfmaq_m_n_f32(float32x4_t a,float32x4_t b,float32_t c,mve_pred16_t p)533 float32x4_t test_vfmaq_m_n_f32(float32x4_t a, float32x4_t b, float32_t c, mve_pred16_t p) {
534 #ifdef POLYMORPHIC
535   return vfmaq_m(a, b, c, p);
536 #else /* POLYMORPHIC */
537   return vfmaq_m_n_f32(a, b, c, p);
538 #endif /* POLYMORPHIC */
539 }
540 
541 // CHECK-LABEL: @test_vfmasq_m_n_f16(
542 // CHECK-NEXT:  entry:
543 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[C:%.*]], i32 0
544 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
545 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
546 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
547 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.fma.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], <8 x half> [[DOTSPLAT]], <8 x i1> [[TMP1]])
548 // CHECK-NEXT:    ret <8 x half> [[TMP2]]
549 //
test_vfmasq_m_n_f16(float16x8_t a,float16x8_t b,float16_t c,mve_pred16_t p)550 float16x8_t test_vfmasq_m_n_f16(float16x8_t a, float16x8_t b, float16_t c, mve_pred16_t p) {
551 #ifdef POLYMORPHIC
552   return vfmasq_m(a, b, c, p);
553 #else /* POLYMORPHIC */
554   return vfmasq_m_n_f16(a, b, c, p);
555 #endif /* POLYMORPHIC */
556 }
557 
558 // CHECK-LABEL: @test_vfmasq_m_n_f32(
559 // CHECK-NEXT:  entry:
560 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[C:%.*]], i32 0
561 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
562 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
563 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
564 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.fma.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], <4 x float> [[DOTSPLAT]], <4 x i1> [[TMP1]])
565 // CHECK-NEXT:    ret <4 x float> [[TMP2]]
566 //
test_vfmasq_m_n_f32(float32x4_t a,float32x4_t b,float32_t c,mve_pred16_t p)567 float32x4_t test_vfmasq_m_n_f32(float32x4_t a, float32x4_t b, float32_t c, mve_pred16_t p) {
568 #ifdef POLYMORPHIC
569   return vfmasq_m(a, b, c, p);
570 #else /* POLYMORPHIC */
571   return vfmasq_m_n_f32(a, b, c, p);
572 #endif /* POLYMORPHIC */
573 }
574 
575 // CHECK-LABEL: @test_vfmsq_m_f16(
576 // CHECK-NEXT:  entry:
577 // CHECK-NEXT:    [[TMP0:%.*]] = fneg <8 x half> [[C:%.*]]
578 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
579 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
580 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x half> @llvm.arm.mve.fma.predicated.v8f16.v8i1(<8 x half> [[B:%.*]], <8 x half> [[TMP0]], <8 x half> [[A:%.*]], <8 x i1> [[TMP2]])
581 // CHECK-NEXT:    ret <8 x half> [[TMP3]]
582 //
test_vfmsq_m_f16(float16x8_t a,float16x8_t b,float16x8_t c,mve_pred16_t p)583 float16x8_t test_vfmsq_m_f16(float16x8_t a, float16x8_t b, float16x8_t c, mve_pred16_t p) {
584 #ifdef POLYMORPHIC
585   return vfmsq_m(a, b, c, p);
586 #else /* POLYMORPHIC */
587   return vfmsq_m_f16(a, b, c, p);
588 #endif /* POLYMORPHIC */
589 }
590 
591 // CHECK-LABEL: @test_vfmsq_m_f32(
592 // CHECK-NEXT:  entry:
593 // CHECK-NEXT:    [[TMP0:%.*]] = fneg <4 x float> [[C:%.*]]
594 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
595 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP1]])
596 // CHECK-NEXT:    [[TMP3:%.*]] = call <4 x float> @llvm.arm.mve.fma.predicated.v4f32.v4i1(<4 x float> [[B:%.*]], <4 x float> [[TMP0]], <4 x float> [[A:%.*]], <4 x i1> [[TMP2]])
597 // CHECK-NEXT:    ret <4 x float> [[TMP3]]
598 //
test_vfmsq_m_f32(float32x4_t a,float32x4_t b,float32x4_t c,mve_pred16_t p)599 float32x4_t test_vfmsq_m_f32(float32x4_t a, float32x4_t b, float32x4_t c, mve_pred16_t p) {
600 #ifdef POLYMORPHIC
601   return vfmsq_m(a, b, c, p);
602 #else /* POLYMORPHIC */
603   return vfmsq_m_f32(a, b, c, p);
604 #endif /* POLYMORPHIC */
605 }
606 
607 // CHECK-LABEL: @test_vmlaq_m_n_s8(
608 // CHECK-NEXT:  entry:
609 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
610 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
611 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP1]])
612 // CHECK-NEXT:    [[TMP3:%.*]] = call <16 x i8> @llvm.arm.mve.vmla.n.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]], <16 x i1> [[TMP2]])
613 // CHECK-NEXT:    ret <16 x i8> [[TMP3]]
614 //
test_vmlaq_m_n_s8(int8x16_t a,int8x16_t b,int8_t c,mve_pred16_t p)615 int8x16_t test_vmlaq_m_n_s8(int8x16_t a, int8x16_t b, int8_t c, mve_pred16_t p) {
616 #ifdef POLYMORPHIC
617   return vmlaq_m(a, b, c, p);
618 #else  /* POLYMORPHIC */
619   return vmlaq_m_n_s8(a, b, c, p);
620 #endif /* POLYMORPHIC */
621 }
622 
623 // CHECK-LABEL: @test_vmlaq_m_n_s16(
624 // CHECK-NEXT:  entry:
625 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
626 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
627 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
628 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x i16> @llvm.arm.mve.vmla.n.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]], <8 x i1> [[TMP2]])
629 // CHECK-NEXT:    ret <8 x i16> [[TMP3]]
630 //
test_vmlaq_m_n_s16(int16x8_t a,int16x8_t b,int16_t c,mve_pred16_t p)631 int16x8_t test_vmlaq_m_n_s16(int16x8_t a, int16x8_t b, int16_t c, mve_pred16_t p) {
632 #ifdef POLYMORPHIC
633   return vmlaq_m(a, b, c, p);
634 #else  /* POLYMORPHIC */
635   return vmlaq_m_n_s16(a, b, c, p);
636 #endif /* POLYMORPHIC */
637 }
638 
639 // CHECK-LABEL: @test_vmlaq_m_n_s32(
640 // CHECK-NEXT:  entry:
641 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
642 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
643 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vmla.n.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]], <4 x i1> [[TMP1]])
644 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
645 //
test_vmlaq_m_n_s32(int32x4_t a,int32x4_t b,int32_t c,mve_pred16_t p)646 int32x4_t test_vmlaq_m_n_s32(int32x4_t a, int32x4_t b, int32_t c, mve_pred16_t p) {
647 #ifdef POLYMORPHIC
648   return vmlaq_m(a, b, c, p);
649 #else  /* POLYMORPHIC */
650   return vmlaq_m_n_s32(a, b, c, p);
651 #endif /* POLYMORPHIC */
652 }
653 
654 // CHECK-LABEL: @test_vmlaq_m_n_u8(
655 // CHECK-NEXT:  entry:
656 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
657 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
658 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP1]])
659 // CHECK-NEXT:    [[TMP3:%.*]] = call <16 x i8> @llvm.arm.mve.vmla.n.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]], <16 x i1> [[TMP2]])
660 // CHECK-NEXT:    ret <16 x i8> [[TMP3]]
661 //
test_vmlaq_m_n_u8(uint8x16_t a,uint8x16_t b,uint8_t c,mve_pred16_t p)662 uint8x16_t test_vmlaq_m_n_u8(uint8x16_t a, uint8x16_t b, uint8_t c, mve_pred16_t p) {
663 #ifdef POLYMORPHIC
664   return vmlaq_m(a, b, c, p);
665 #else  /* POLYMORPHIC */
666   return vmlaq_m_n_u8(a, b, c, p);
667 #endif /* POLYMORPHIC */
668 }
669 
670 // CHECK-LABEL: @test_vmlaq_m_n_u16(
671 // CHECK-NEXT:  entry:
672 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
673 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
674 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
675 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x i16> @llvm.arm.mve.vmla.n.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]], <8 x i1> [[TMP2]])
676 // CHECK-NEXT:    ret <8 x i16> [[TMP3]]
677 //
test_vmlaq_m_n_u16(uint16x8_t a,uint16x8_t b,uint16_t c,mve_pred16_t p)678 uint16x8_t test_vmlaq_m_n_u16(uint16x8_t a, uint16x8_t b, uint16_t c, mve_pred16_t p) {
679 #ifdef POLYMORPHIC
680   return vmlaq_m(a, b, c, p);
681 #else  /* POLYMORPHIC */
682   return vmlaq_m_n_u16(a, b, c, p);
683 #endif /* POLYMORPHIC */
684 }
685 
686 // CHECK-LABEL: @test_vmlaq_m_n_u32(
687 // CHECK-NEXT:  entry:
688 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
689 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
690 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vmla.n.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]], <4 x i1> [[TMP1]])
691 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
692 //
test_vmlaq_m_n_u32(uint32x4_t a,uint32x4_t b,uint32_t c,mve_pred16_t p)693 uint32x4_t test_vmlaq_m_n_u32(uint32x4_t a, uint32x4_t b, uint32_t c, mve_pred16_t p) {
694 #ifdef POLYMORPHIC
695   return vmlaq_m(a, b, c, p);
696 #else  /* POLYMORPHIC */
697   return vmlaq_m_n_u32(a, b, c, p);
698 #endif /* POLYMORPHIC */
699 }
700 
701 // CHECK-LABEL: @test_vmlasq_m_n_s8(
702 // CHECK-NEXT:  entry:
703 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
704 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
705 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP1]])
706 // CHECK-NEXT:    [[TMP3:%.*]] = call <16 x i8> @llvm.arm.mve.vmlas.n.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]], <16 x i1> [[TMP2]])
707 // CHECK-NEXT:    ret <16 x i8> [[TMP3]]
708 //
test_vmlasq_m_n_s8(int8x16_t a,int8x16_t b,int8_t c,mve_pred16_t p)709 int8x16_t test_vmlasq_m_n_s8(int8x16_t a, int8x16_t b, int8_t c, mve_pred16_t p) {
710 #ifdef POLYMORPHIC
711   return vmlasq_m(a, b, c, p);
712 #else  /* POLYMORPHIC */
713   return vmlasq_m_n_s8(a, b, c, p);
714 #endif /* POLYMORPHIC */
715 }
716 
717 // CHECK-LABEL: @test_vmlasq_m_n_s16(
718 // CHECK-NEXT:  entry:
719 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
720 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
721 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
722 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x i16> @llvm.arm.mve.vmlas.n.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]], <8 x i1> [[TMP2]])
723 // CHECK-NEXT:    ret <8 x i16> [[TMP3]]
724 //
test_vmlasq_m_n_s16(int16x8_t a,int16x8_t b,int16_t c,mve_pred16_t p)725 int16x8_t test_vmlasq_m_n_s16(int16x8_t a, int16x8_t b, int16_t c, mve_pred16_t p) {
726 #ifdef POLYMORPHIC
727   return vmlasq_m(a, b, c, p);
728 #else  /* POLYMORPHIC */
729   return vmlasq_m_n_s16(a, b, c, p);
730 #endif /* POLYMORPHIC */
731 }
732 
733 // CHECK-LABEL: @test_vmlasq_m_n_s32(
734 // CHECK-NEXT:  entry:
735 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
736 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
737 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vmlas.n.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]], <4 x i1> [[TMP1]])
738 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
739 //
test_vmlasq_m_n_s32(int32x4_t a,int32x4_t b,int32_t c,mve_pred16_t p)740 int32x4_t test_vmlasq_m_n_s32(int32x4_t a, int32x4_t b, int32_t c, mve_pred16_t p) {
741 #ifdef POLYMORPHIC
742   return vmlasq_m(a, b, c, p);
743 #else  /* POLYMORPHIC */
744   return vmlasq_m_n_s32(a, b, c, p);
745 #endif /* POLYMORPHIC */
746 }
747 
748 // CHECK-LABEL: @test_vmlasq_m_n_u8(
749 // CHECK-NEXT:  entry:
750 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
751 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
752 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP1]])
753 // CHECK-NEXT:    [[TMP3:%.*]] = call <16 x i8> @llvm.arm.mve.vmlas.n.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]], <16 x i1> [[TMP2]])
754 // CHECK-NEXT:    ret <16 x i8> [[TMP3]]
755 //
test_vmlasq_m_n_u8(uint8x16_t a,uint8x16_t b,uint8_t c,mve_pred16_t p)756 uint8x16_t test_vmlasq_m_n_u8(uint8x16_t a, uint8x16_t b, uint8_t c, mve_pred16_t p) {
757 #ifdef POLYMORPHIC
758   return vmlasq_m(a, b, c, p);
759 #else  /* POLYMORPHIC */
760   return vmlasq_m_n_u8(a, b, c, p);
761 #endif /* POLYMORPHIC */
762 }
763 
764 // CHECK-LABEL: @test_vmlasq_m_n_u16(
765 // CHECK-NEXT:  entry:
766 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
767 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
768 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
769 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x i16> @llvm.arm.mve.vmlas.n.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]], <8 x i1> [[TMP2]])
770 // CHECK-NEXT:    ret <8 x i16> [[TMP3]]
771 //
test_vmlasq_m_n_u16(uint16x8_t a,uint16x8_t b,uint16_t c,mve_pred16_t p)772 uint16x8_t test_vmlasq_m_n_u16(uint16x8_t a, uint16x8_t b, uint16_t c, mve_pred16_t p) {
773 #ifdef POLYMORPHIC
774   return vmlasq_m(a, b, c, p);
775 #else  /* POLYMORPHIC */
776   return vmlasq_m_n_u16(a, b, c, p);
777 #endif /* POLYMORPHIC */
778 }
779 
780 // CHECK-LABEL: @test_vmlasq_m_n_u32(
781 // CHECK-NEXT:  entry:
782 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
783 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
784 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vmlas.n.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]], <4 x i1> [[TMP1]])
785 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
786 //
test_vmlasq_m_n_u32(uint32x4_t a,uint32x4_t b,uint32_t c,mve_pred16_t p)787 uint32x4_t test_vmlasq_m_n_u32(uint32x4_t a, uint32x4_t b, uint32_t c, mve_pred16_t p) {
788 #ifdef POLYMORPHIC
789   return vmlasq_m(a, b, c, p);
790 #else  /* POLYMORPHIC */
791   return vmlasq_m_n_u32(a, b, c, p);
792 #endif /* POLYMORPHIC */
793 }
794 
795 // CHECK-LABEL: @test_vqdmlahq_m_n_s8(
796 // CHECK-NEXT:  entry:
797 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
798 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
799 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP1]])
800 // CHECK-NEXT:    [[TMP3:%.*]] = call <16 x i8> @llvm.arm.mve.vqdmlah.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]], <16 x i1> [[TMP2]])
801 // CHECK-NEXT:    ret <16 x i8> [[TMP3]]
802 //
test_vqdmlahq_m_n_s8(int8x16_t a,int8x16_t b,int8_t c,mve_pred16_t p)803 int8x16_t test_vqdmlahq_m_n_s8(int8x16_t a, int8x16_t b, int8_t c, mve_pred16_t p) {
804 #ifdef POLYMORPHIC
805   return vqdmlahq_m(a, b, c, p);
806 #else  /* POLYMORPHIC */
807   return vqdmlahq_m_n_s8(a, b, c, p);
808 #endif /* POLYMORPHIC */
809 }
810 
811 // CHECK-LABEL: @test_vqdmlahq_m_n_s16(
812 // CHECK-NEXT:  entry:
813 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
814 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
815 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
816 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x i16> @llvm.arm.mve.vqdmlah.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]], <8 x i1> [[TMP2]])
817 // CHECK-NEXT:    ret <8 x i16> [[TMP3]]
818 //
test_vqdmlahq_m_n_s16(int16x8_t a,int16x8_t b,int16_t c,mve_pred16_t p)819 int16x8_t test_vqdmlahq_m_n_s16(int16x8_t a, int16x8_t b, int16_t c, mve_pred16_t p) {
820 #ifdef POLYMORPHIC
821   return vqdmlahq_m(a, b, c, p);
822 #else  /* POLYMORPHIC */
823   return vqdmlahq_m_n_s16(a, b, c, p);
824 #endif /* POLYMORPHIC */
825 }
826 
827 // CHECK-LABEL: @test_vqdmlahq_m_n_s32(
828 // CHECK-NEXT:  entry:
829 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
830 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
831 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vqdmlah.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]], <4 x i1> [[TMP1]])
832 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
833 //
test_vqdmlahq_m_n_s32(int32x4_t a,int32x4_t b,int32_t c,mve_pred16_t p)834 int32x4_t test_vqdmlahq_m_n_s32(int32x4_t a, int32x4_t b, int32_t c, mve_pred16_t p) {
835 #ifdef POLYMORPHIC
836   return vqdmlahq_m(a, b, c, p);
837 #else  /* POLYMORPHIC */
838   return vqdmlahq_m_n_s32(a, b, c, p);
839 #endif /* POLYMORPHIC */
840 }
841 
842 // CHECK-LABEL: @test_vqdmlashq_m_n_s8(
843 // CHECK-NEXT:  entry:
844 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[ADD:%.*]] to i32
845 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
846 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP1]])
847 // CHECK-NEXT:    [[TMP3:%.*]] = call <16 x i8> @llvm.arm.mve.vqdmlash.predicated.v16i8.v16i1(<16 x i8> [[M1:%.*]], <16 x i8> [[M2:%.*]], i32 [[TMP0]], <16 x i1> [[TMP2]])
848 // CHECK-NEXT:    ret <16 x i8> [[TMP3]]
849 //
test_vqdmlashq_m_n_s8(int8x16_t m1,int8x16_t m2,int8_t add,mve_pred16_t p)850 int8x16_t test_vqdmlashq_m_n_s8(int8x16_t m1, int8x16_t m2, int8_t add, mve_pred16_t p) {
851 #ifdef POLYMORPHIC
852   return vqdmlashq_m(m1, m2, add, p);
853 #else  /* POLYMORPHIC */
854   return vqdmlashq_m_n_s8(m1, m2, add, p);
855 #endif /* POLYMORPHIC */
856 }
857 
858 // CHECK-LABEL: @test_vqdmlashq_m_n_s16(
859 // CHECK-NEXT:  entry:
860 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[ADD:%.*]] to i32
861 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
862 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
863 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x i16> @llvm.arm.mve.vqdmlash.predicated.v8i16.v8i1(<8 x i16> [[M1:%.*]], <8 x i16> [[M2:%.*]], i32 [[TMP0]], <8 x i1> [[TMP2]])
864 // CHECK-NEXT:    ret <8 x i16> [[TMP3]]
865 //
test_vqdmlashq_m_n_s16(int16x8_t m1,int16x8_t m2,int16_t add,mve_pred16_t p)866 int16x8_t test_vqdmlashq_m_n_s16(int16x8_t m1, int16x8_t m2, int16_t add, mve_pred16_t p) {
867 #ifdef POLYMORPHIC
868   return vqdmlashq_m(m1, m2, add, p);
869 #else  /* POLYMORPHIC */
870   return vqdmlashq_m_n_s16(m1, m2, add, p);
871 #endif /* POLYMORPHIC */
872 }
873 
874 // CHECK-LABEL: @test_vqdmlashq_m_n_s32(
875 // CHECK-NEXT:  entry:
876 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
877 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
878 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vqdmlash.predicated.v4i32.v4i1(<4 x i32> [[M1:%.*]], <4 x i32> [[M2:%.*]], i32 [[ADD:%.*]], <4 x i1> [[TMP1]])
879 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
880 //
test_vqdmlashq_m_n_s32(int32x4_t m1,int32x4_t m2,int32_t add,mve_pred16_t p)881 int32x4_t test_vqdmlashq_m_n_s32(int32x4_t m1, int32x4_t m2, int32_t add, mve_pred16_t p) {
882 #ifdef POLYMORPHIC
883   return vqdmlashq_m(m1, m2, add, p);
884 #else  /* POLYMORPHIC */
885   return vqdmlashq_m_n_s32(m1, m2, add, p);
886 #endif /* POLYMORPHIC */
887 }
888 
889 // CHECK-LABEL: @test_vqrdmlahq_m_n_s8(
890 // CHECK-NEXT:  entry:
891 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
892 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
893 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP1]])
894 // CHECK-NEXT:    [[TMP3:%.*]] = call <16 x i8> @llvm.arm.mve.vqrdmlah.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]], <16 x i1> [[TMP2]])
895 // CHECK-NEXT:    ret <16 x i8> [[TMP3]]
896 //
test_vqrdmlahq_m_n_s8(int8x16_t a,int8x16_t b,int8_t c,mve_pred16_t p)897 int8x16_t test_vqrdmlahq_m_n_s8(int8x16_t a, int8x16_t b, int8_t c, mve_pred16_t p) {
898 #ifdef POLYMORPHIC
899   return vqrdmlahq_m(a, b, c, p);
900 #else  /* POLYMORPHIC */
901   return vqrdmlahq_m_n_s8(a, b, c, p);
902 #endif /* POLYMORPHIC */
903 }
904 
905 // CHECK-LABEL: @test_vqrdmlahq_m_n_s16(
906 // CHECK-NEXT:  entry:
907 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
908 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
909 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
910 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x i16> @llvm.arm.mve.vqrdmlah.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]], <8 x i1> [[TMP2]])
911 // CHECK-NEXT:    ret <8 x i16> [[TMP3]]
912 //
test_vqrdmlahq_m_n_s16(int16x8_t a,int16x8_t b,int16_t c,mve_pred16_t p)913 int16x8_t test_vqrdmlahq_m_n_s16(int16x8_t a, int16x8_t b, int16_t c, mve_pred16_t p) {
914 #ifdef POLYMORPHIC
915   return vqrdmlahq_m(a, b, c, p);
916 #else  /* POLYMORPHIC */
917   return vqrdmlahq_m_n_s16(a, b, c, p);
918 #endif /* POLYMORPHIC */
919 }
920 
921 // CHECK-LABEL: @test_vqrdmlahq_m_n_s32(
922 // CHECK-NEXT:  entry:
923 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
924 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
925 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vqrdmlah.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]], <4 x i1> [[TMP1]])
926 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
927 //
test_vqrdmlahq_m_n_s32(int32x4_t a,int32x4_t b,int32_t c,mve_pred16_t p)928 int32x4_t test_vqrdmlahq_m_n_s32(int32x4_t a, int32x4_t b, int32_t c, mve_pred16_t p) {
929 #ifdef POLYMORPHIC
930   return vqrdmlahq_m(a, b, c, p);
931 #else  /* POLYMORPHIC */
932   return vqrdmlahq_m_n_s32(a, b, c, p);
933 #endif /* POLYMORPHIC */
934 }
935 
936 // CHECK-LABEL: @test_vqrdmlashq_m_n_s8(
937 // CHECK-NEXT:  entry:
938 // CHECK-NEXT:    [[TMP0:%.*]] = zext i8 [[C:%.*]] to i32
939 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
940 // CHECK-NEXT:    [[TMP2:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP1]])
941 // CHECK-NEXT:    [[TMP3:%.*]] = call <16 x i8> @llvm.arm.mve.vqrdmlash.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], i32 [[TMP0]], <16 x i1> [[TMP2]])
942 // CHECK-NEXT:    ret <16 x i8> [[TMP3]]
943 //
test_vqrdmlashq_m_n_s8(int8x16_t a,int8x16_t b,int8_t c,mve_pred16_t p)944 int8x16_t test_vqrdmlashq_m_n_s8(int8x16_t a, int8x16_t b, int8_t c, mve_pred16_t p) {
945 #ifdef POLYMORPHIC
946   return vqrdmlashq_m(a, b, c, p);
947 #else  /* POLYMORPHIC */
948   return vqrdmlashq_m_n_s8(a, b, c, p);
949 #endif /* POLYMORPHIC */
950 }
951 
952 // CHECK-LABEL: @test_vqrdmlashq_m_n_s16(
953 // CHECK-NEXT:  entry:
954 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[C:%.*]] to i32
955 // CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[P:%.*]] to i32
956 // CHECK-NEXT:    [[TMP2:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP1]])
957 // CHECK-NEXT:    [[TMP3:%.*]] = call <8 x i16> @llvm.arm.mve.vqrdmlash.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], i32 [[TMP0]], <8 x i1> [[TMP2]])
958 // CHECK-NEXT:    ret <8 x i16> [[TMP3]]
959 //
test_vqrdmlashq_m_n_s16(int16x8_t a,int16x8_t b,int16_t c,mve_pred16_t p)960 int16x8_t test_vqrdmlashq_m_n_s16(int16x8_t a, int16x8_t b, int16_t c, mve_pred16_t p) {
961 #ifdef POLYMORPHIC
962   return vqrdmlashq_m(a, b, c, p);
963 #else  /* POLYMORPHIC */
964   return vqrdmlashq_m_n_s16(a, b, c, p);
965 #endif /* POLYMORPHIC */
966 }
967 
968 // CHECK-LABEL: @test_vqrdmlashq_m_n_s32(
969 // CHECK-NEXT:  entry:
970 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
971 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
972 // CHECK-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.vqrdmlash.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], i32 [[C:%.*]], <4 x i1> [[TMP1]])
973 // CHECK-NEXT:    ret <4 x i32> [[TMP2]]
974 //
test_vqrdmlashq_m_n_s32(int32x4_t a,int32x4_t b,int32_t c,mve_pred16_t p)975 int32x4_t test_vqrdmlashq_m_n_s32(int32x4_t a, int32x4_t b, int32_t c, mve_pred16_t p) {
976 #ifdef POLYMORPHIC
977   return vqrdmlashq_m(a, b, c, p);
978 #else  /* POLYMORPHIC */
979   return vqrdmlashq_m_n_s32(a, b, c, p);
980 #endif /* POLYMORPHIC */
981 }
982