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