1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -fallow-half-arguments-and-returns -O0 -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -mem2reg -sroa | FileCheck %s
3 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -fallow-half-arguments-and-returns -O0 -disable-O0-optnone -DPOLYMORPHIC -S -emit-llvm -o - %s | opt -S -mem2reg -sroa | FileCheck %s
4 
5 #include <arm_mve.h>
6 
7 // CHECK-LABEL: @test_vcmpeqq_f16(
8 // CHECK-NEXT:  entry:
9 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp oeq <8 x half> [[A:%.*]], [[B:%.*]]
10 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
11 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
12 // CHECK-NEXT:    ret i16 [[TMP2]]
13 //
test_vcmpeqq_f16(float16x8_t a,float16x8_t b)14 mve_pred16_t test_vcmpeqq_f16(float16x8_t a, float16x8_t b)
15 {
16 #ifdef POLYMORPHIC
17     return vcmpeqq(a, b);
18 #else /* POLYMORPHIC */
19     return vcmpeqq_f16(a, b);
20 #endif /* POLYMORPHIC */
21 }
22 
23 // CHECK-LABEL: @test_vcmpeqq_f32(
24 // CHECK-NEXT:  entry:
25 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp oeq <4 x float> [[A:%.*]], [[B:%.*]]
26 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
27 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
28 // CHECK-NEXT:    ret i16 [[TMP2]]
29 //
test_vcmpeqq_f32(float32x4_t a,float32x4_t b)30 mve_pred16_t test_vcmpeqq_f32(float32x4_t a, float32x4_t b)
31 {
32 #ifdef POLYMORPHIC
33     return vcmpeqq(a, b);
34 #else /* POLYMORPHIC */
35     return vcmpeqq_f32(a, b);
36 #endif /* POLYMORPHIC */
37 }
38 
39 // CHECK-LABEL: @test_vcmpeqq_s8(
40 // CHECK-NEXT:  entry:
41 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <16 x i8> [[A:%.*]], [[B:%.*]]
42 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
43 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
44 // CHECK-NEXT:    ret i16 [[TMP2]]
45 //
test_vcmpeqq_s8(int8x16_t a,int8x16_t b)46 mve_pred16_t test_vcmpeqq_s8(int8x16_t a, int8x16_t b)
47 {
48 #ifdef POLYMORPHIC
49     return vcmpeqq(a, b);
50 #else /* POLYMORPHIC */
51     return vcmpeqq_s8(a, b);
52 #endif /* POLYMORPHIC */
53 }
54 
55 // CHECK-LABEL: @test_vcmpeqq_s16(
56 // CHECK-NEXT:  entry:
57 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <8 x i16> [[A:%.*]], [[B:%.*]]
58 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
59 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
60 // CHECK-NEXT:    ret i16 [[TMP2]]
61 //
test_vcmpeqq_s16(int16x8_t a,int16x8_t b)62 mve_pred16_t test_vcmpeqq_s16(int16x8_t a, int16x8_t b)
63 {
64 #ifdef POLYMORPHIC
65     return vcmpeqq(a, b);
66 #else /* POLYMORPHIC */
67     return vcmpeqq_s16(a, b);
68 #endif /* POLYMORPHIC */
69 }
70 
71 // CHECK-LABEL: @test_vcmpeqq_s32(
72 // CHECK-NEXT:  entry:
73 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <4 x i32> [[A:%.*]], [[B:%.*]]
74 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
75 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
76 // CHECK-NEXT:    ret i16 [[TMP2]]
77 //
test_vcmpeqq_s32(int32x4_t a,int32x4_t b)78 mve_pred16_t test_vcmpeqq_s32(int32x4_t a, int32x4_t b)
79 {
80 #ifdef POLYMORPHIC
81     return vcmpeqq(a, b);
82 #else /* POLYMORPHIC */
83     return vcmpeqq_s32(a, b);
84 #endif /* POLYMORPHIC */
85 }
86 
87 // CHECK-LABEL: @test_vcmpeqq_u8(
88 // CHECK-NEXT:  entry:
89 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <16 x i8> [[A:%.*]], [[B:%.*]]
90 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
91 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
92 // CHECK-NEXT:    ret i16 [[TMP2]]
93 //
test_vcmpeqq_u8(uint8x16_t a,uint8x16_t b)94 mve_pred16_t test_vcmpeqq_u8(uint8x16_t a, uint8x16_t b)
95 {
96 #ifdef POLYMORPHIC
97     return vcmpeqq(a, b);
98 #else /* POLYMORPHIC */
99     return vcmpeqq_u8(a, b);
100 #endif /* POLYMORPHIC */
101 }
102 
103 // CHECK-LABEL: @test_vcmpeqq_u16(
104 // CHECK-NEXT:  entry:
105 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <8 x i16> [[A:%.*]], [[B:%.*]]
106 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
107 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
108 // CHECK-NEXT:    ret i16 [[TMP2]]
109 //
test_vcmpeqq_u16(uint16x8_t a,uint16x8_t b)110 mve_pred16_t test_vcmpeqq_u16(uint16x8_t a, uint16x8_t b)
111 {
112 #ifdef POLYMORPHIC
113     return vcmpeqq(a, b);
114 #else /* POLYMORPHIC */
115     return vcmpeqq_u16(a, b);
116 #endif /* POLYMORPHIC */
117 }
118 
119 // CHECK-LABEL: @test_vcmpeqq_u32(
120 // CHECK-NEXT:  entry:
121 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <4 x i32> [[A:%.*]], [[B:%.*]]
122 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
123 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
124 // CHECK-NEXT:    ret i16 [[TMP2]]
125 //
test_vcmpeqq_u32(uint32x4_t a,uint32x4_t b)126 mve_pred16_t test_vcmpeqq_u32(uint32x4_t a, uint32x4_t b)
127 {
128 #ifdef POLYMORPHIC
129     return vcmpeqq(a, b);
130 #else /* POLYMORPHIC */
131     return vcmpeqq_u32(a, b);
132 #endif /* POLYMORPHIC */
133 }
134 
135 // CHECK-LABEL: @test_vcmpeqq_n_f16(
136 // CHECK-NEXT:  entry:
137 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
138 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
139 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp oeq <8 x half> [[A:%.*]], [[DOTSPLAT]]
140 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
141 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
142 // CHECK-NEXT:    ret i16 [[TMP2]]
143 //
test_vcmpeqq_n_f16(float16x8_t a,float16_t b)144 mve_pred16_t test_vcmpeqq_n_f16(float16x8_t a, float16_t b)
145 {
146 #ifdef POLYMORPHIC
147     return vcmpeqq(a, b);
148 #else /* POLYMORPHIC */
149     return vcmpeqq_n_f16(a, b);
150 #endif /* POLYMORPHIC */
151 }
152 
153 // CHECK-LABEL: @test_vcmpeqq_n_f32(
154 // CHECK-NEXT:  entry:
155 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
156 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
157 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp oeq <4 x float> [[A:%.*]], [[DOTSPLAT]]
158 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
159 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
160 // CHECK-NEXT:    ret i16 [[TMP2]]
161 //
test_vcmpeqq_n_f32(float32x4_t a,float32_t b)162 mve_pred16_t test_vcmpeqq_n_f32(float32x4_t a, float32_t b)
163 {
164 #ifdef POLYMORPHIC
165     return vcmpeqq(a, b);
166 #else /* POLYMORPHIC */
167     return vcmpeqq_n_f32(a, b);
168 #endif /* POLYMORPHIC */
169 }
170 
171 // CHECK-LABEL: @test_vcmpeqq_n_s8(
172 // CHECK-NEXT:  entry:
173 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
174 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
175 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <16 x i8> [[A:%.*]], [[DOTSPLAT]]
176 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
177 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
178 // CHECK-NEXT:    ret i16 [[TMP2]]
179 //
test_vcmpeqq_n_s8(int8x16_t a,int8_t b)180 mve_pred16_t test_vcmpeqq_n_s8(int8x16_t a, int8_t b)
181 {
182 #ifdef POLYMORPHIC
183     return vcmpeqq(a, b);
184 #else /* POLYMORPHIC */
185     return vcmpeqq_n_s8(a, b);
186 #endif /* POLYMORPHIC */
187 }
188 
189 // CHECK-LABEL: @test_vcmpeqq_n_s16(
190 // CHECK-NEXT:  entry:
191 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
192 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
193 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <8 x i16> [[A:%.*]], [[DOTSPLAT]]
194 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
195 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
196 // CHECK-NEXT:    ret i16 [[TMP2]]
197 //
test_vcmpeqq_n_s16(int16x8_t a,int16_t b)198 mve_pred16_t test_vcmpeqq_n_s16(int16x8_t a, int16_t b)
199 {
200 #ifdef POLYMORPHIC
201     return vcmpeqq(a, b);
202 #else /* POLYMORPHIC */
203     return vcmpeqq_n_s16(a, b);
204 #endif /* POLYMORPHIC */
205 }
206 
207 // CHECK-LABEL: @test_vcmpeqq_n_s32(
208 // CHECK-NEXT:  entry:
209 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
210 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
211 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <4 x i32> [[A:%.*]], [[DOTSPLAT]]
212 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
213 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
214 // CHECK-NEXT:    ret i16 [[TMP2]]
215 //
test_vcmpeqq_n_s32(int32x4_t a,int32_t b)216 mve_pred16_t test_vcmpeqq_n_s32(int32x4_t a, int32_t b)
217 {
218 #ifdef POLYMORPHIC
219     return vcmpeqq(a, b);
220 #else /* POLYMORPHIC */
221     return vcmpeqq_n_s32(a, b);
222 #endif /* POLYMORPHIC */
223 }
224 
225 // CHECK-LABEL: @test_vcmpeqq_n_u8(
226 // CHECK-NEXT:  entry:
227 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
228 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
229 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <16 x i8> [[A:%.*]], [[DOTSPLAT]]
230 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
231 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
232 // CHECK-NEXT:    ret i16 [[TMP2]]
233 //
test_vcmpeqq_n_u8(uint8x16_t a,uint8_t b)234 mve_pred16_t test_vcmpeqq_n_u8(uint8x16_t a, uint8_t b)
235 {
236 #ifdef POLYMORPHIC
237     return vcmpeqq(a, b);
238 #else /* POLYMORPHIC */
239     return vcmpeqq_n_u8(a, b);
240 #endif /* POLYMORPHIC */
241 }
242 
243 // CHECK-LABEL: @test_vcmpeqq_n_u16(
244 // CHECK-NEXT:  entry:
245 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
246 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
247 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <8 x i16> [[A:%.*]], [[DOTSPLAT]]
248 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
249 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
250 // CHECK-NEXT:    ret i16 [[TMP2]]
251 //
test_vcmpeqq_n_u16(uint16x8_t a,uint16_t b)252 mve_pred16_t test_vcmpeqq_n_u16(uint16x8_t a, uint16_t b)
253 {
254 #ifdef POLYMORPHIC
255     return vcmpeqq(a, b);
256 #else /* POLYMORPHIC */
257     return vcmpeqq_n_u16(a, b);
258 #endif /* POLYMORPHIC */
259 }
260 
261 // CHECK-LABEL: @test_vcmpeqq_n_u32(
262 // CHECK-NEXT:  entry:
263 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
264 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
265 // CHECK-NEXT:    [[TMP0:%.*]] = icmp eq <4 x i32> [[A:%.*]], [[DOTSPLAT]]
266 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
267 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
268 // CHECK-NEXT:    ret i16 [[TMP2]]
269 //
test_vcmpeqq_n_u32(uint32x4_t a,uint32_t b)270 mve_pred16_t test_vcmpeqq_n_u32(uint32x4_t a, uint32_t b)
271 {
272 #ifdef POLYMORPHIC
273     return vcmpeqq(a, b);
274 #else /* POLYMORPHIC */
275     return vcmpeqq_n_u32(a, b);
276 #endif /* POLYMORPHIC */
277 }
278 
279 // CHECK-LABEL: @test_vcmpeqq_m_f16(
280 // CHECK-NEXT:  entry:
281 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
282 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
283 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp oeq <8 x half> [[A:%.*]], [[B:%.*]]
284 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
285 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
286 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
287 // CHECK-NEXT:    ret i16 [[TMP5]]
288 //
test_vcmpeqq_m_f16(float16x8_t a,float16x8_t b,mve_pred16_t p)289 mve_pred16_t test_vcmpeqq_m_f16(float16x8_t a, float16x8_t b, mve_pred16_t p)
290 {
291 #ifdef POLYMORPHIC
292     return vcmpeqq_m(a, b, p);
293 #else /* POLYMORPHIC */
294     return vcmpeqq_m_f16(a, b, p);
295 #endif /* POLYMORPHIC */
296 }
297 
298 // CHECK-LABEL: @test_vcmpeqq_m_f32(
299 // CHECK-NEXT:  entry:
300 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
301 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
302 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp oeq <4 x float> [[A:%.*]], [[B:%.*]]
303 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
304 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
305 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
306 // CHECK-NEXT:    ret i16 [[TMP5]]
307 //
test_vcmpeqq_m_f32(float32x4_t a,float32x4_t b,mve_pred16_t p)308 mve_pred16_t test_vcmpeqq_m_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)
309 {
310 #ifdef POLYMORPHIC
311     return vcmpeqq_m(a, b, p);
312 #else /* POLYMORPHIC */
313     return vcmpeqq_m_f32(a, b, p);
314 #endif /* POLYMORPHIC */
315 }
316 
317 // CHECK-LABEL: @test_vcmpeqq_m_s8(
318 // CHECK-NEXT:  entry:
319 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
320 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
321 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <16 x i8> [[A:%.*]], [[B:%.*]]
322 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
323 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
324 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
325 // CHECK-NEXT:    ret i16 [[TMP5]]
326 //
test_vcmpeqq_m_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)327 mve_pred16_t test_vcmpeqq_m_s8(int8x16_t a, int8x16_t b, mve_pred16_t p)
328 {
329 #ifdef POLYMORPHIC
330     return vcmpeqq_m(a, b, p);
331 #else /* POLYMORPHIC */
332     return vcmpeqq_m_s8(a, b, p);
333 #endif /* POLYMORPHIC */
334 }
335 
336 // CHECK-LABEL: @test_vcmpeqq_m_s16(
337 // CHECK-NEXT:  entry:
338 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
339 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
340 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <8 x i16> [[A:%.*]], [[B:%.*]]
341 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
342 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
343 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
344 // CHECK-NEXT:    ret i16 [[TMP5]]
345 //
test_vcmpeqq_m_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)346 mve_pred16_t test_vcmpeqq_m_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
347 {
348 #ifdef POLYMORPHIC
349     return vcmpeqq_m(a, b, p);
350 #else /* POLYMORPHIC */
351     return vcmpeqq_m_s16(a, b, p);
352 #endif /* POLYMORPHIC */
353 }
354 
355 // CHECK-LABEL: @test_vcmpeqq_m_s32(
356 // CHECK-NEXT:  entry:
357 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
358 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
359 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <4 x i32> [[A:%.*]], [[B:%.*]]
360 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
361 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
362 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
363 // CHECK-NEXT:    ret i16 [[TMP5]]
364 //
test_vcmpeqq_m_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)365 mve_pred16_t test_vcmpeqq_m_s32(int32x4_t a, int32x4_t b, mve_pred16_t p)
366 {
367 #ifdef POLYMORPHIC
368     return vcmpeqq_m(a, b, p);
369 #else /* POLYMORPHIC */
370     return vcmpeqq_m_s32(a, b, p);
371 #endif /* POLYMORPHIC */
372 }
373 
374 // CHECK-LABEL: @test_vcmpeqq_m_u8(
375 // CHECK-NEXT:  entry:
376 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
377 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
378 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <16 x i8> [[A:%.*]], [[B:%.*]]
379 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
380 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
381 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
382 // CHECK-NEXT:    ret i16 [[TMP5]]
383 //
test_vcmpeqq_m_u8(uint8x16_t a,uint8x16_t b,mve_pred16_t p)384 mve_pred16_t test_vcmpeqq_m_u8(uint8x16_t a, uint8x16_t b, mve_pred16_t p)
385 {
386 #ifdef POLYMORPHIC
387     return vcmpeqq_m(a, b, p);
388 #else /* POLYMORPHIC */
389     return vcmpeqq_m_u8(a, b, p);
390 #endif /* POLYMORPHIC */
391 }
392 
393 // CHECK-LABEL: @test_vcmpeqq_m_u16(
394 // CHECK-NEXT:  entry:
395 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
396 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
397 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <8 x i16> [[A:%.*]], [[B:%.*]]
398 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
399 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
400 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
401 // CHECK-NEXT:    ret i16 [[TMP5]]
402 //
test_vcmpeqq_m_u16(uint16x8_t a,uint16x8_t b,mve_pred16_t p)403 mve_pred16_t test_vcmpeqq_m_u16(uint16x8_t a, uint16x8_t b, mve_pred16_t p)
404 {
405 #ifdef POLYMORPHIC
406     return vcmpeqq_m(a, b, p);
407 #else /* POLYMORPHIC */
408     return vcmpeqq_m_u16(a, b, p);
409 #endif /* POLYMORPHIC */
410 }
411 
412 // CHECK-LABEL: @test_vcmpeqq_m_u32(
413 // CHECK-NEXT:  entry:
414 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
415 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
416 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <4 x i32> [[A:%.*]], [[B:%.*]]
417 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
418 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
419 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
420 // CHECK-NEXT:    ret i16 [[TMP5]]
421 //
test_vcmpeqq_m_u32(uint32x4_t a,uint32x4_t b,mve_pred16_t p)422 mve_pred16_t test_vcmpeqq_m_u32(uint32x4_t a, uint32x4_t b, mve_pred16_t p)
423 {
424 #ifdef POLYMORPHIC
425     return vcmpeqq_m(a, b, p);
426 #else /* POLYMORPHIC */
427     return vcmpeqq_m_u32(a, b, p);
428 #endif /* POLYMORPHIC */
429 }
430 
431 // CHECK-LABEL: @test_vcmpeqq_m_n_f16(
432 // CHECK-NEXT:  entry:
433 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
434 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
435 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
436 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
437 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp oeq <8 x half> [[A:%.*]], [[DOTSPLAT]]
438 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
439 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
440 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
441 // CHECK-NEXT:    ret i16 [[TMP5]]
442 //
test_vcmpeqq_m_n_f16(float16x8_t a,float16_t b,mve_pred16_t p)443 mve_pred16_t test_vcmpeqq_m_n_f16(float16x8_t a, float16_t b, mve_pred16_t p)
444 {
445 #ifdef POLYMORPHIC
446     return vcmpeqq_m(a, b, p);
447 #else /* POLYMORPHIC */
448     return vcmpeqq_m_n_f16(a, b, p);
449 #endif /* POLYMORPHIC */
450 }
451 
452 // CHECK-LABEL: @test_vcmpeqq_m_n_f32(
453 // CHECK-NEXT:  entry:
454 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
455 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
456 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
457 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
458 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp oeq <4 x float> [[A:%.*]], [[DOTSPLAT]]
459 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
460 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
461 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
462 // CHECK-NEXT:    ret i16 [[TMP5]]
463 //
test_vcmpeqq_m_n_f32(float32x4_t a,float32_t b,mve_pred16_t p)464 mve_pred16_t test_vcmpeqq_m_n_f32(float32x4_t a, float32_t b, mve_pred16_t p)
465 {
466 #ifdef POLYMORPHIC
467     return vcmpeqq_m(a, b, p);
468 #else /* POLYMORPHIC */
469     return vcmpeqq_m_n_f32(a, b, p);
470 #endif /* POLYMORPHIC */
471 }
472 
473 // CHECK-LABEL: @test_vcmpeqq_m_n_s8(
474 // CHECK-NEXT:  entry:
475 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
476 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
477 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
478 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
479 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <16 x i8> [[A:%.*]], [[DOTSPLAT]]
480 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
481 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
482 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
483 // CHECK-NEXT:    ret i16 [[TMP5]]
484 //
test_vcmpeqq_m_n_s8(int8x16_t a,int8_t b,mve_pred16_t p)485 mve_pred16_t test_vcmpeqq_m_n_s8(int8x16_t a, int8_t b, mve_pred16_t p)
486 {
487 #ifdef POLYMORPHIC
488     return vcmpeqq_m(a, b, p);
489 #else /* POLYMORPHIC */
490     return vcmpeqq_m_n_s8(a, b, p);
491 #endif /* POLYMORPHIC */
492 }
493 
494 // CHECK-LABEL: @test_vcmpeqq_m_n_s16(
495 // CHECK-NEXT:  entry:
496 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
497 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
498 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
499 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
500 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <8 x i16> [[A:%.*]], [[DOTSPLAT]]
501 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
502 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
503 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
504 // CHECK-NEXT:    ret i16 [[TMP5]]
505 //
test_vcmpeqq_m_n_s16(int16x8_t a,int16_t b,mve_pred16_t p)506 mve_pred16_t test_vcmpeqq_m_n_s16(int16x8_t a, int16_t b, mve_pred16_t p)
507 {
508 #ifdef POLYMORPHIC
509     return vcmpeqq_m(a, b, p);
510 #else /* POLYMORPHIC */
511     return vcmpeqq_m_n_s16(a, b, p);
512 #endif /* POLYMORPHIC */
513 }
514 
515 // CHECK-LABEL: @test_vcmpeqq_m_n_s32(
516 // CHECK-NEXT:  entry:
517 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
518 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
519 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
520 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
521 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <4 x i32> [[A:%.*]], [[DOTSPLAT]]
522 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
523 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
524 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
525 // CHECK-NEXT:    ret i16 [[TMP5]]
526 //
test_vcmpeqq_m_n_s32(int32x4_t a,int32_t b,mve_pred16_t p)527 mve_pred16_t test_vcmpeqq_m_n_s32(int32x4_t a, int32_t b, mve_pred16_t p)
528 {
529 #ifdef POLYMORPHIC
530     return vcmpeqq_m(a, b, p);
531 #else /* POLYMORPHIC */
532     return vcmpeqq_m_n_s32(a, b, p);
533 #endif /* POLYMORPHIC */
534 }
535 
536 // CHECK-LABEL: @test_vcmpeqq_m_n_u8(
537 // CHECK-NEXT:  entry:
538 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
539 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
540 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
541 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
542 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <16 x i8> [[A:%.*]], [[DOTSPLAT]]
543 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
544 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
545 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
546 // CHECK-NEXT:    ret i16 [[TMP5]]
547 //
test_vcmpeqq_m_n_u8(uint8x16_t a,uint8_t b,mve_pred16_t p)548 mve_pred16_t test_vcmpeqq_m_n_u8(uint8x16_t a, uint8_t b, mve_pred16_t p)
549 {
550 #ifdef POLYMORPHIC
551     return vcmpeqq_m(a, b, p);
552 #else /* POLYMORPHIC */
553     return vcmpeqq_m_n_u8(a, b, p);
554 #endif /* POLYMORPHIC */
555 }
556 
557 // CHECK-LABEL: @test_vcmpeqq_m_n_u16(
558 // CHECK-NEXT:  entry:
559 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
560 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
561 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
562 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
563 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <8 x i16> [[A:%.*]], [[DOTSPLAT]]
564 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
565 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
566 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
567 // CHECK-NEXT:    ret i16 [[TMP5]]
568 //
test_vcmpeqq_m_n_u16(uint16x8_t a,uint16_t b,mve_pred16_t p)569 mve_pred16_t test_vcmpeqq_m_n_u16(uint16x8_t a, uint16_t b, mve_pred16_t p)
570 {
571 #ifdef POLYMORPHIC
572     return vcmpeqq_m(a, b, p);
573 #else /* POLYMORPHIC */
574     return vcmpeqq_m_n_u16(a, b, p);
575 #endif /* POLYMORPHIC */
576 }
577 
578 // CHECK-LABEL: @test_vcmpeqq_m_n_u32(
579 // CHECK-NEXT:  entry:
580 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
581 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
582 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
583 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
584 // CHECK-NEXT:    [[TMP2:%.*]] = icmp eq <4 x i32> [[A:%.*]], [[DOTSPLAT]]
585 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
586 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
587 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
588 // CHECK-NEXT:    ret i16 [[TMP5]]
589 //
test_vcmpeqq_m_n_u32(uint32x4_t a,uint32_t b,mve_pred16_t p)590 mve_pred16_t test_vcmpeqq_m_n_u32(uint32x4_t a, uint32_t b, mve_pred16_t p)
591 {
592 #ifdef POLYMORPHIC
593     return vcmpeqq_m(a, b, p);
594 #else /* POLYMORPHIC */
595     return vcmpeqq_m_n_u32(a, b, p);
596 #endif /* POLYMORPHIC */
597 }
598 
599 // CHECK-LABEL: @test_vcmpneq_f16(
600 // CHECK-NEXT:  entry:
601 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp une <8 x half> [[A:%.*]], [[B:%.*]]
602 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
603 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
604 // CHECK-NEXT:    ret i16 [[TMP2]]
605 //
test_vcmpneq_f16(float16x8_t a,float16x8_t b)606 mve_pred16_t test_vcmpneq_f16(float16x8_t a, float16x8_t b)
607 {
608 #ifdef POLYMORPHIC
609     return vcmpneq(a, b);
610 #else /* POLYMORPHIC */
611     return vcmpneq_f16(a, b);
612 #endif /* POLYMORPHIC */
613 }
614 
615 // CHECK-LABEL: @test_vcmpneq_f32(
616 // CHECK-NEXT:  entry:
617 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp une <4 x float> [[A:%.*]], [[B:%.*]]
618 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
619 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
620 // CHECK-NEXT:    ret i16 [[TMP2]]
621 //
test_vcmpneq_f32(float32x4_t a,float32x4_t b)622 mve_pred16_t test_vcmpneq_f32(float32x4_t a, float32x4_t b)
623 {
624 #ifdef POLYMORPHIC
625     return vcmpneq(a, b);
626 #else /* POLYMORPHIC */
627     return vcmpneq_f32(a, b);
628 #endif /* POLYMORPHIC */
629 }
630 
631 // CHECK-LABEL: @test_vcmpneq_s8(
632 // CHECK-NEXT:  entry:
633 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <16 x i8> [[A:%.*]], [[B:%.*]]
634 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
635 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
636 // CHECK-NEXT:    ret i16 [[TMP2]]
637 //
test_vcmpneq_s8(int8x16_t a,int8x16_t b)638 mve_pred16_t test_vcmpneq_s8(int8x16_t a, int8x16_t b)
639 {
640 #ifdef POLYMORPHIC
641     return vcmpneq(a, b);
642 #else /* POLYMORPHIC */
643     return vcmpneq_s8(a, b);
644 #endif /* POLYMORPHIC */
645 }
646 
647 // CHECK-LABEL: @test_vcmpneq_s16(
648 // CHECK-NEXT:  entry:
649 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <8 x i16> [[A:%.*]], [[B:%.*]]
650 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
651 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
652 // CHECK-NEXT:    ret i16 [[TMP2]]
653 //
test_vcmpneq_s16(int16x8_t a,int16x8_t b)654 mve_pred16_t test_vcmpneq_s16(int16x8_t a, int16x8_t b)
655 {
656 #ifdef POLYMORPHIC
657     return vcmpneq(a, b);
658 #else /* POLYMORPHIC */
659     return vcmpneq_s16(a, b);
660 #endif /* POLYMORPHIC */
661 }
662 
663 // CHECK-LABEL: @test_vcmpneq_s32(
664 // CHECK-NEXT:  entry:
665 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <4 x i32> [[A:%.*]], [[B:%.*]]
666 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
667 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
668 // CHECK-NEXT:    ret i16 [[TMP2]]
669 //
test_vcmpneq_s32(int32x4_t a,int32x4_t b)670 mve_pred16_t test_vcmpneq_s32(int32x4_t a, int32x4_t b)
671 {
672 #ifdef POLYMORPHIC
673     return vcmpneq(a, b);
674 #else /* POLYMORPHIC */
675     return vcmpneq_s32(a, b);
676 #endif /* POLYMORPHIC */
677 }
678 
679 // CHECK-LABEL: @test_vcmpneq_u8(
680 // CHECK-NEXT:  entry:
681 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <16 x i8> [[A:%.*]], [[B:%.*]]
682 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
683 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
684 // CHECK-NEXT:    ret i16 [[TMP2]]
685 //
test_vcmpneq_u8(uint8x16_t a,uint8x16_t b)686 mve_pred16_t test_vcmpneq_u8(uint8x16_t a, uint8x16_t b)
687 {
688 #ifdef POLYMORPHIC
689     return vcmpneq(a, b);
690 #else /* POLYMORPHIC */
691     return vcmpneq_u8(a, b);
692 #endif /* POLYMORPHIC */
693 }
694 
695 // CHECK-LABEL: @test_vcmpneq_u16(
696 // CHECK-NEXT:  entry:
697 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <8 x i16> [[A:%.*]], [[B:%.*]]
698 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
699 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
700 // CHECK-NEXT:    ret i16 [[TMP2]]
701 //
test_vcmpneq_u16(uint16x8_t a,uint16x8_t b)702 mve_pred16_t test_vcmpneq_u16(uint16x8_t a, uint16x8_t b)
703 {
704 #ifdef POLYMORPHIC
705     return vcmpneq(a, b);
706 #else /* POLYMORPHIC */
707     return vcmpneq_u16(a, b);
708 #endif /* POLYMORPHIC */
709 }
710 
711 // CHECK-LABEL: @test_vcmpneq_u32(
712 // CHECK-NEXT:  entry:
713 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <4 x i32> [[A:%.*]], [[B:%.*]]
714 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
715 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
716 // CHECK-NEXT:    ret i16 [[TMP2]]
717 //
test_vcmpneq_u32(uint32x4_t a,uint32x4_t b)718 mve_pred16_t test_vcmpneq_u32(uint32x4_t a, uint32x4_t b)
719 {
720 #ifdef POLYMORPHIC
721     return vcmpneq(a, b);
722 #else /* POLYMORPHIC */
723     return vcmpneq_u32(a, b);
724 #endif /* POLYMORPHIC */
725 }
726 
727 // CHECK-LABEL: @test_vcmpneq_n_f16(
728 // CHECK-NEXT:  entry:
729 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
730 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
731 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp une <8 x half> [[A:%.*]], [[DOTSPLAT]]
732 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
733 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
734 // CHECK-NEXT:    ret i16 [[TMP2]]
735 //
test_vcmpneq_n_f16(float16x8_t a,float16_t b)736 mve_pred16_t test_vcmpneq_n_f16(float16x8_t a, float16_t b)
737 {
738 #ifdef POLYMORPHIC
739     return vcmpneq(a, b);
740 #else /* POLYMORPHIC */
741     return vcmpneq_n_f16(a, b);
742 #endif /* POLYMORPHIC */
743 }
744 
745 // CHECK-LABEL: @test_vcmpneq_n_f32(
746 // CHECK-NEXT:  entry:
747 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
748 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
749 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp une <4 x float> [[A:%.*]], [[DOTSPLAT]]
750 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
751 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
752 // CHECK-NEXT:    ret i16 [[TMP2]]
753 //
test_vcmpneq_n_f32(float32x4_t a,float32_t b)754 mve_pred16_t test_vcmpneq_n_f32(float32x4_t a, float32_t b)
755 {
756 #ifdef POLYMORPHIC
757     return vcmpneq(a, b);
758 #else /* POLYMORPHIC */
759     return vcmpneq_n_f32(a, b);
760 #endif /* POLYMORPHIC */
761 }
762 
763 // CHECK-LABEL: @test_vcmpneq_n_s8(
764 // CHECK-NEXT:  entry:
765 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
766 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
767 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <16 x i8> [[A:%.*]], [[DOTSPLAT]]
768 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
769 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
770 // CHECK-NEXT:    ret i16 [[TMP2]]
771 //
test_vcmpneq_n_s8(int8x16_t a,int8_t b)772 mve_pred16_t test_vcmpneq_n_s8(int8x16_t a, int8_t b)
773 {
774 #ifdef POLYMORPHIC
775     return vcmpneq(a, b);
776 #else /* POLYMORPHIC */
777     return vcmpneq_n_s8(a, b);
778 #endif /* POLYMORPHIC */
779 }
780 
781 // CHECK-LABEL: @test_vcmpneq_n_s16(
782 // CHECK-NEXT:  entry:
783 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
784 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
785 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <8 x i16> [[A:%.*]], [[DOTSPLAT]]
786 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
787 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
788 // CHECK-NEXT:    ret i16 [[TMP2]]
789 //
test_vcmpneq_n_s16(int16x8_t a,int16_t b)790 mve_pred16_t test_vcmpneq_n_s16(int16x8_t a, int16_t b)
791 {
792 #ifdef POLYMORPHIC
793     return vcmpneq(a, b);
794 #else /* POLYMORPHIC */
795     return vcmpneq_n_s16(a, b);
796 #endif /* POLYMORPHIC */
797 }
798 
799 // CHECK-LABEL: @test_vcmpneq_n_s32(
800 // CHECK-NEXT:  entry:
801 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
802 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
803 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <4 x i32> [[A:%.*]], [[DOTSPLAT]]
804 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
805 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
806 // CHECK-NEXT:    ret i16 [[TMP2]]
807 //
test_vcmpneq_n_s32(int32x4_t a,int32_t b)808 mve_pred16_t test_vcmpneq_n_s32(int32x4_t a, int32_t b)
809 {
810 #ifdef POLYMORPHIC
811     return vcmpneq(a, b);
812 #else /* POLYMORPHIC */
813     return vcmpneq_n_s32(a, b);
814 #endif /* POLYMORPHIC */
815 }
816 
817 // CHECK-LABEL: @test_vcmpneq_n_u8(
818 // CHECK-NEXT:  entry:
819 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
820 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
821 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <16 x i8> [[A:%.*]], [[DOTSPLAT]]
822 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
823 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
824 // CHECK-NEXT:    ret i16 [[TMP2]]
825 //
test_vcmpneq_n_u8(uint8x16_t a,uint8_t b)826 mve_pred16_t test_vcmpneq_n_u8(uint8x16_t a, uint8_t b)
827 {
828 #ifdef POLYMORPHIC
829     return vcmpneq(a, b);
830 #else /* POLYMORPHIC */
831     return vcmpneq_n_u8(a, b);
832 #endif /* POLYMORPHIC */
833 }
834 
835 // CHECK-LABEL: @test_vcmpneq_n_u16(
836 // CHECK-NEXT:  entry:
837 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
838 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
839 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <8 x i16> [[A:%.*]], [[DOTSPLAT]]
840 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
841 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
842 // CHECK-NEXT:    ret i16 [[TMP2]]
843 //
test_vcmpneq_n_u16(uint16x8_t a,uint16_t b)844 mve_pred16_t test_vcmpneq_n_u16(uint16x8_t a, uint16_t b)
845 {
846 #ifdef POLYMORPHIC
847     return vcmpneq(a, b);
848 #else /* POLYMORPHIC */
849     return vcmpneq_n_u16(a, b);
850 #endif /* POLYMORPHIC */
851 }
852 
853 // CHECK-LABEL: @test_vcmpneq_n_u32(
854 // CHECK-NEXT:  entry:
855 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
856 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
857 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ne <4 x i32> [[A:%.*]], [[DOTSPLAT]]
858 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
859 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
860 // CHECK-NEXT:    ret i16 [[TMP2]]
861 //
test_vcmpneq_n_u32(uint32x4_t a,uint32_t b)862 mve_pred16_t test_vcmpneq_n_u32(uint32x4_t a, uint32_t b)
863 {
864 #ifdef POLYMORPHIC
865     return vcmpneq(a, b);
866 #else /* POLYMORPHIC */
867     return vcmpneq_n_u32(a, b);
868 #endif /* POLYMORPHIC */
869 }
870 
871 // CHECK-LABEL: @test_vcmpneq_m_f16(
872 // CHECK-NEXT:  entry:
873 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
874 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
875 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp une <8 x half> [[A:%.*]], [[B:%.*]]
876 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
877 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
878 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
879 // CHECK-NEXT:    ret i16 [[TMP5]]
880 //
test_vcmpneq_m_f16(float16x8_t a,float16x8_t b,mve_pred16_t p)881 mve_pred16_t test_vcmpneq_m_f16(float16x8_t a, float16x8_t b, mve_pred16_t p)
882 {
883 #ifdef POLYMORPHIC
884     return vcmpneq_m(a, b, p);
885 #else /* POLYMORPHIC */
886     return vcmpneq_m_f16(a, b, p);
887 #endif /* POLYMORPHIC */
888 }
889 
890 // CHECK-LABEL: @test_vcmpneq_m_f32(
891 // CHECK-NEXT:  entry:
892 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
893 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
894 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp une <4 x float> [[A:%.*]], [[B:%.*]]
895 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
896 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
897 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
898 // CHECK-NEXT:    ret i16 [[TMP5]]
899 //
test_vcmpneq_m_f32(float32x4_t a,float32x4_t b,mve_pred16_t p)900 mve_pred16_t test_vcmpneq_m_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)
901 {
902 #ifdef POLYMORPHIC
903     return vcmpneq_m(a, b, p);
904 #else /* POLYMORPHIC */
905     return vcmpneq_m_f32(a, b, p);
906 #endif /* POLYMORPHIC */
907 }
908 
909 // CHECK-LABEL: @test_vcmpneq_m_s8(
910 // CHECK-NEXT:  entry:
911 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
912 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
913 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <16 x i8> [[A:%.*]], [[B:%.*]]
914 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
915 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
916 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
917 // CHECK-NEXT:    ret i16 [[TMP5]]
918 //
test_vcmpneq_m_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)919 mve_pred16_t test_vcmpneq_m_s8(int8x16_t a, int8x16_t b, mve_pred16_t p)
920 {
921 #ifdef POLYMORPHIC
922     return vcmpneq_m(a, b, p);
923 #else /* POLYMORPHIC */
924     return vcmpneq_m_s8(a, b, p);
925 #endif /* POLYMORPHIC */
926 }
927 
928 // CHECK-LABEL: @test_vcmpneq_m_s16(
929 // CHECK-NEXT:  entry:
930 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
931 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
932 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <8 x i16> [[A:%.*]], [[B:%.*]]
933 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
934 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
935 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
936 // CHECK-NEXT:    ret i16 [[TMP5]]
937 //
test_vcmpneq_m_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)938 mve_pred16_t test_vcmpneq_m_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
939 {
940 #ifdef POLYMORPHIC
941     return vcmpneq_m(a, b, p);
942 #else /* POLYMORPHIC */
943     return vcmpneq_m_s16(a, b, p);
944 #endif /* POLYMORPHIC */
945 }
946 
947 // CHECK-LABEL: @test_vcmpneq_m_s32(
948 // CHECK-NEXT:  entry:
949 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
950 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
951 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <4 x i32> [[A:%.*]], [[B:%.*]]
952 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
953 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
954 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
955 // CHECK-NEXT:    ret i16 [[TMP5]]
956 //
test_vcmpneq_m_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)957 mve_pred16_t test_vcmpneq_m_s32(int32x4_t a, int32x4_t b, mve_pred16_t p)
958 {
959 #ifdef POLYMORPHIC
960     return vcmpneq_m(a, b, p);
961 #else /* POLYMORPHIC */
962     return vcmpneq_m_s32(a, b, p);
963 #endif /* POLYMORPHIC */
964 }
965 
966 // CHECK-LABEL: @test_vcmpneq_m_u8(
967 // CHECK-NEXT:  entry:
968 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
969 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
970 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <16 x i8> [[A:%.*]], [[B:%.*]]
971 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
972 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
973 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
974 // CHECK-NEXT:    ret i16 [[TMP5]]
975 //
test_vcmpneq_m_u8(uint8x16_t a,uint8x16_t b,mve_pred16_t p)976 mve_pred16_t test_vcmpneq_m_u8(uint8x16_t a, uint8x16_t b, mve_pred16_t p)
977 {
978 #ifdef POLYMORPHIC
979     return vcmpneq_m(a, b, p);
980 #else /* POLYMORPHIC */
981     return vcmpneq_m_u8(a, b, p);
982 #endif /* POLYMORPHIC */
983 }
984 
985 // CHECK-LABEL: @test_vcmpneq_m_u16(
986 // CHECK-NEXT:  entry:
987 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
988 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
989 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <8 x i16> [[A:%.*]], [[B:%.*]]
990 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
991 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
992 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
993 // CHECK-NEXT:    ret i16 [[TMP5]]
994 //
test_vcmpneq_m_u16(uint16x8_t a,uint16x8_t b,mve_pred16_t p)995 mve_pred16_t test_vcmpneq_m_u16(uint16x8_t a, uint16x8_t b, mve_pred16_t p)
996 {
997 #ifdef POLYMORPHIC
998     return vcmpneq_m(a, b, p);
999 #else /* POLYMORPHIC */
1000     return vcmpneq_m_u16(a, b, p);
1001 #endif /* POLYMORPHIC */
1002 }
1003 
1004 // CHECK-LABEL: @test_vcmpneq_m_u32(
1005 // CHECK-NEXT:  entry:
1006 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1007 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1008 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <4 x i32> [[A:%.*]], [[B:%.*]]
1009 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1010 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1011 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1012 // CHECK-NEXT:    ret i16 [[TMP5]]
1013 //
test_vcmpneq_m_u32(uint32x4_t a,uint32x4_t b,mve_pred16_t p)1014 mve_pred16_t test_vcmpneq_m_u32(uint32x4_t a, uint32x4_t b, mve_pred16_t p)
1015 {
1016 #ifdef POLYMORPHIC
1017     return vcmpneq_m(a, b, p);
1018 #else /* POLYMORPHIC */
1019     return vcmpneq_m_u32(a, b, p);
1020 #endif /* POLYMORPHIC */
1021 }
1022 
1023 // CHECK-LABEL: @test_vcmpneq_m_n_f16(
1024 // CHECK-NEXT:  entry:
1025 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1026 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1027 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
1028 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
1029 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp une <8 x half> [[A:%.*]], [[DOTSPLAT]]
1030 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1031 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1032 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1033 // CHECK-NEXT:    ret i16 [[TMP5]]
1034 //
test_vcmpneq_m_n_f16(float16x8_t a,float16_t b,mve_pred16_t p)1035 mve_pred16_t test_vcmpneq_m_n_f16(float16x8_t a, float16_t b, mve_pred16_t p)
1036 {
1037 #ifdef POLYMORPHIC
1038     return vcmpneq_m(a, b, p);
1039 #else /* POLYMORPHIC */
1040     return vcmpneq_m_n_f16(a, b, p);
1041 #endif /* POLYMORPHIC */
1042 }
1043 
1044 // CHECK-LABEL: @test_vcmpneq_m_n_f32(
1045 // CHECK-NEXT:  entry:
1046 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1047 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1048 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
1049 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
1050 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp une <4 x float> [[A:%.*]], [[DOTSPLAT]]
1051 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1052 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1053 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1054 // CHECK-NEXT:    ret i16 [[TMP5]]
1055 //
test_vcmpneq_m_n_f32(float32x4_t a,float32_t b,mve_pred16_t p)1056 mve_pred16_t test_vcmpneq_m_n_f32(float32x4_t a, float32_t b, mve_pred16_t p)
1057 {
1058 #ifdef POLYMORPHIC
1059     return vcmpneq_m(a, b, p);
1060 #else /* POLYMORPHIC */
1061     return vcmpneq_m_n_f32(a, b, p);
1062 #endif /* POLYMORPHIC */
1063 }
1064 
1065 // CHECK-LABEL: @test_vcmpneq_m_n_s8(
1066 // CHECK-NEXT:  entry:
1067 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1068 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1069 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
1070 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
1071 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <16 x i8> [[A:%.*]], [[DOTSPLAT]]
1072 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
1073 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
1074 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1075 // CHECK-NEXT:    ret i16 [[TMP5]]
1076 //
test_vcmpneq_m_n_s8(int8x16_t a,int8_t b,mve_pred16_t p)1077 mve_pred16_t test_vcmpneq_m_n_s8(int8x16_t a, int8_t b, mve_pred16_t p)
1078 {
1079 #ifdef POLYMORPHIC
1080     return vcmpneq_m(a, b, p);
1081 #else /* POLYMORPHIC */
1082     return vcmpneq_m_n_s8(a, b, p);
1083 #endif /* POLYMORPHIC */
1084 }
1085 
1086 // CHECK-LABEL: @test_vcmpneq_m_n_s16(
1087 // CHECK-NEXT:  entry:
1088 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1089 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1090 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
1091 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
1092 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <8 x i16> [[A:%.*]], [[DOTSPLAT]]
1093 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1094 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1095 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1096 // CHECK-NEXT:    ret i16 [[TMP5]]
1097 //
test_vcmpneq_m_n_s16(int16x8_t a,int16_t b,mve_pred16_t p)1098 mve_pred16_t test_vcmpneq_m_n_s16(int16x8_t a, int16_t b, mve_pred16_t p)
1099 {
1100 #ifdef POLYMORPHIC
1101     return vcmpneq_m(a, b, p);
1102 #else /* POLYMORPHIC */
1103     return vcmpneq_m_n_s16(a, b, p);
1104 #endif /* POLYMORPHIC */
1105 }
1106 
1107 // CHECK-LABEL: @test_vcmpneq_m_n_s32(
1108 // CHECK-NEXT:  entry:
1109 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1110 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1111 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
1112 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
1113 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <4 x i32> [[A:%.*]], [[DOTSPLAT]]
1114 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1115 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1116 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1117 // CHECK-NEXT:    ret i16 [[TMP5]]
1118 //
test_vcmpneq_m_n_s32(int32x4_t a,int32_t b,mve_pred16_t p)1119 mve_pred16_t test_vcmpneq_m_n_s32(int32x4_t a, int32_t b, mve_pred16_t p)
1120 {
1121 #ifdef POLYMORPHIC
1122     return vcmpneq_m(a, b, p);
1123 #else /* POLYMORPHIC */
1124     return vcmpneq_m_n_s32(a, b, p);
1125 #endif /* POLYMORPHIC */
1126 }
1127 
1128 // CHECK-LABEL: @test_vcmpneq_m_n_u8(
1129 // CHECK-NEXT:  entry:
1130 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1131 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1132 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
1133 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
1134 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <16 x i8> [[A:%.*]], [[DOTSPLAT]]
1135 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
1136 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
1137 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1138 // CHECK-NEXT:    ret i16 [[TMP5]]
1139 //
test_vcmpneq_m_n_u8(uint8x16_t a,uint8_t b,mve_pred16_t p)1140 mve_pred16_t test_vcmpneq_m_n_u8(uint8x16_t a, uint8_t b, mve_pred16_t p)
1141 {
1142 #ifdef POLYMORPHIC
1143     return vcmpneq_m(a, b, p);
1144 #else /* POLYMORPHIC */
1145     return vcmpneq_m_n_u8(a, b, p);
1146 #endif /* POLYMORPHIC */
1147 }
1148 
1149 // CHECK-LABEL: @test_vcmpneq_m_n_u16(
1150 // CHECK-NEXT:  entry:
1151 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1152 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1153 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
1154 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
1155 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <8 x i16> [[A:%.*]], [[DOTSPLAT]]
1156 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1157 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1158 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1159 // CHECK-NEXT:    ret i16 [[TMP5]]
1160 //
test_vcmpneq_m_n_u16(uint16x8_t a,uint16_t b,mve_pred16_t p)1161 mve_pred16_t test_vcmpneq_m_n_u16(uint16x8_t a, uint16_t b, mve_pred16_t p)
1162 {
1163 #ifdef POLYMORPHIC
1164     return vcmpneq_m(a, b, p);
1165 #else /* POLYMORPHIC */
1166     return vcmpneq_m_n_u16(a, b, p);
1167 #endif /* POLYMORPHIC */
1168 }
1169 
1170 // CHECK-LABEL: @test_vcmpneq_m_n_u32(
1171 // CHECK-NEXT:  entry:
1172 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1173 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1174 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
1175 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
1176 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ne <4 x i32> [[A:%.*]], [[DOTSPLAT]]
1177 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1178 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1179 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1180 // CHECK-NEXT:    ret i16 [[TMP5]]
1181 //
test_vcmpneq_m_n_u32(uint32x4_t a,uint32_t b,mve_pred16_t p)1182 mve_pred16_t test_vcmpneq_m_n_u32(uint32x4_t a, uint32_t b, mve_pred16_t p)
1183 {
1184 #ifdef POLYMORPHIC
1185     return vcmpneq_m(a, b, p);
1186 #else /* POLYMORPHIC */
1187     return vcmpneq_m_n_u32(a, b, p);
1188 #endif /* POLYMORPHIC */
1189 }
1190 
1191 // CHECK-LABEL: @test_vcmpgeq_f16(
1192 // CHECK-NEXT:  entry:
1193 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp oge <8 x half> [[A:%.*]], [[B:%.*]]
1194 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1195 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1196 // CHECK-NEXT:    ret i16 [[TMP2]]
1197 //
test_vcmpgeq_f16(float16x8_t a,float16x8_t b)1198 mve_pred16_t test_vcmpgeq_f16(float16x8_t a, float16x8_t b)
1199 {
1200 #ifdef POLYMORPHIC
1201     return vcmpgeq(a, b);
1202 #else /* POLYMORPHIC */
1203     return vcmpgeq_f16(a, b);
1204 #endif /* POLYMORPHIC */
1205 }
1206 
1207 // CHECK-LABEL: @test_vcmpgeq_f32(
1208 // CHECK-NEXT:  entry:
1209 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp oge <4 x float> [[A:%.*]], [[B:%.*]]
1210 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1211 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1212 // CHECK-NEXT:    ret i16 [[TMP2]]
1213 //
test_vcmpgeq_f32(float32x4_t a,float32x4_t b)1214 mve_pred16_t test_vcmpgeq_f32(float32x4_t a, float32x4_t b)
1215 {
1216 #ifdef POLYMORPHIC
1217     return vcmpgeq(a, b);
1218 #else /* POLYMORPHIC */
1219     return vcmpgeq_f32(a, b);
1220 #endif /* POLYMORPHIC */
1221 }
1222 
1223 // CHECK-LABEL: @test_vcmpgeq_s8(
1224 // CHECK-NEXT:  entry:
1225 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sge <16 x i8> [[A:%.*]], [[B:%.*]]
1226 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
1227 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1228 // CHECK-NEXT:    ret i16 [[TMP2]]
1229 //
test_vcmpgeq_s8(int8x16_t a,int8x16_t b)1230 mve_pred16_t test_vcmpgeq_s8(int8x16_t a, int8x16_t b)
1231 {
1232 #ifdef POLYMORPHIC
1233     return vcmpgeq(a, b);
1234 #else /* POLYMORPHIC */
1235     return vcmpgeq_s8(a, b);
1236 #endif /* POLYMORPHIC */
1237 }
1238 
1239 // CHECK-LABEL: @test_vcmpgeq_s16(
1240 // CHECK-NEXT:  entry:
1241 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sge <8 x i16> [[A:%.*]], [[B:%.*]]
1242 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1243 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1244 // CHECK-NEXT:    ret i16 [[TMP2]]
1245 //
test_vcmpgeq_s16(int16x8_t a,int16x8_t b)1246 mve_pred16_t test_vcmpgeq_s16(int16x8_t a, int16x8_t b)
1247 {
1248 #ifdef POLYMORPHIC
1249     return vcmpgeq(a, b);
1250 #else /* POLYMORPHIC */
1251     return vcmpgeq_s16(a, b);
1252 #endif /* POLYMORPHIC */
1253 }
1254 
1255 // CHECK-LABEL: @test_vcmpgeq_s32(
1256 // CHECK-NEXT:  entry:
1257 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sge <4 x i32> [[A:%.*]], [[B:%.*]]
1258 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1259 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1260 // CHECK-NEXT:    ret i16 [[TMP2]]
1261 //
test_vcmpgeq_s32(int32x4_t a,int32x4_t b)1262 mve_pred16_t test_vcmpgeq_s32(int32x4_t a, int32x4_t b)
1263 {
1264 #ifdef POLYMORPHIC
1265     return vcmpgeq(a, b);
1266 #else /* POLYMORPHIC */
1267     return vcmpgeq_s32(a, b);
1268 #endif /* POLYMORPHIC */
1269 }
1270 
1271 // CHECK-LABEL: @test_vcmpcsq_u8(
1272 // CHECK-NEXT:  entry:
1273 // CHECK-NEXT:    [[TMP0:%.*]] = icmp uge <16 x i8> [[A:%.*]], [[B:%.*]]
1274 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
1275 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1276 // CHECK-NEXT:    ret i16 [[TMP2]]
1277 //
test_vcmpcsq_u8(uint8x16_t a,uint8x16_t b)1278 mve_pred16_t test_vcmpcsq_u8(uint8x16_t a, uint8x16_t b)
1279 {
1280 #ifdef POLYMORPHIC
1281     return vcmpcsq(a, b);
1282 #else /* POLYMORPHIC */
1283     return vcmpcsq_u8(a, b);
1284 #endif /* POLYMORPHIC */
1285 }
1286 
1287 // CHECK-LABEL: @test_vcmpcsq_u16(
1288 // CHECK-NEXT:  entry:
1289 // CHECK-NEXT:    [[TMP0:%.*]] = icmp uge <8 x i16> [[A:%.*]], [[B:%.*]]
1290 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1291 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1292 // CHECK-NEXT:    ret i16 [[TMP2]]
1293 //
test_vcmpcsq_u16(uint16x8_t a,uint16x8_t b)1294 mve_pred16_t test_vcmpcsq_u16(uint16x8_t a, uint16x8_t b)
1295 {
1296 #ifdef POLYMORPHIC
1297     return vcmpcsq(a, b);
1298 #else /* POLYMORPHIC */
1299     return vcmpcsq_u16(a, b);
1300 #endif /* POLYMORPHIC */
1301 }
1302 
1303 // CHECK-LABEL: @test_vcmpcsq_u32(
1304 // CHECK-NEXT:  entry:
1305 // CHECK-NEXT:    [[TMP0:%.*]] = icmp uge <4 x i32> [[A:%.*]], [[B:%.*]]
1306 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1307 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1308 // CHECK-NEXT:    ret i16 [[TMP2]]
1309 //
test_vcmpcsq_u32(uint32x4_t a,uint32x4_t b)1310 mve_pred16_t test_vcmpcsq_u32(uint32x4_t a, uint32x4_t b)
1311 {
1312 #ifdef POLYMORPHIC
1313     return vcmpcsq(a, b);
1314 #else /* POLYMORPHIC */
1315     return vcmpcsq_u32(a, b);
1316 #endif /* POLYMORPHIC */
1317 }
1318 
1319 // CHECK-LABEL: @test_vcmpgeq_n_f16(
1320 // CHECK-NEXT:  entry:
1321 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
1322 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
1323 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp oge <8 x half> [[A:%.*]], [[DOTSPLAT]]
1324 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1325 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1326 // CHECK-NEXT:    ret i16 [[TMP2]]
1327 //
test_vcmpgeq_n_f16(float16x8_t a,float16_t b)1328 mve_pred16_t test_vcmpgeq_n_f16(float16x8_t a, float16_t b)
1329 {
1330 #ifdef POLYMORPHIC
1331     return vcmpgeq(a, b);
1332 #else /* POLYMORPHIC */
1333     return vcmpgeq_n_f16(a, b);
1334 #endif /* POLYMORPHIC */
1335 }
1336 
1337 // CHECK-LABEL: @test_vcmpgeq_n_f32(
1338 // CHECK-NEXT:  entry:
1339 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
1340 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
1341 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp oge <4 x float> [[A:%.*]], [[DOTSPLAT]]
1342 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1343 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1344 // CHECK-NEXT:    ret i16 [[TMP2]]
1345 //
test_vcmpgeq_n_f32(float32x4_t a,float32_t b)1346 mve_pred16_t test_vcmpgeq_n_f32(float32x4_t a, float32_t b)
1347 {
1348 #ifdef POLYMORPHIC
1349     return vcmpgeq(a, b);
1350 #else /* POLYMORPHIC */
1351     return vcmpgeq_n_f32(a, b);
1352 #endif /* POLYMORPHIC */
1353 }
1354 
1355 // CHECK-LABEL: @test_vcmpgeq_n_s8(
1356 // CHECK-NEXT:  entry:
1357 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
1358 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
1359 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sge <16 x i8> [[A:%.*]], [[DOTSPLAT]]
1360 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
1361 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1362 // CHECK-NEXT:    ret i16 [[TMP2]]
1363 //
test_vcmpgeq_n_s8(int8x16_t a,int8_t b)1364 mve_pred16_t test_vcmpgeq_n_s8(int8x16_t a, int8_t b)
1365 {
1366 #ifdef POLYMORPHIC
1367     return vcmpgeq(a, b);
1368 #else /* POLYMORPHIC */
1369     return vcmpgeq_n_s8(a, b);
1370 #endif /* POLYMORPHIC */
1371 }
1372 
1373 // CHECK-LABEL: @test_vcmpgeq_n_s16(
1374 // CHECK-NEXT:  entry:
1375 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
1376 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
1377 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sge <8 x i16> [[A:%.*]], [[DOTSPLAT]]
1378 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1379 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1380 // CHECK-NEXT:    ret i16 [[TMP2]]
1381 //
test_vcmpgeq_n_s16(int16x8_t a,int16_t b)1382 mve_pred16_t test_vcmpgeq_n_s16(int16x8_t a, int16_t b)
1383 {
1384 #ifdef POLYMORPHIC
1385     return vcmpgeq(a, b);
1386 #else /* POLYMORPHIC */
1387     return vcmpgeq_n_s16(a, b);
1388 #endif /* POLYMORPHIC */
1389 }
1390 
1391 // CHECK-LABEL: @test_vcmpgeq_n_s32(
1392 // CHECK-NEXT:  entry:
1393 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
1394 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
1395 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sge <4 x i32> [[A:%.*]], [[DOTSPLAT]]
1396 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1397 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1398 // CHECK-NEXT:    ret i16 [[TMP2]]
1399 //
test_vcmpgeq_n_s32(int32x4_t a,int32_t b)1400 mve_pred16_t test_vcmpgeq_n_s32(int32x4_t a, int32_t b)
1401 {
1402 #ifdef POLYMORPHIC
1403     return vcmpgeq(a, b);
1404 #else /* POLYMORPHIC */
1405     return vcmpgeq_n_s32(a, b);
1406 #endif /* POLYMORPHIC */
1407 }
1408 
1409 // CHECK-LABEL: @test_vcmpcsq_n_u8(
1410 // CHECK-NEXT:  entry:
1411 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
1412 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
1413 // CHECK-NEXT:    [[TMP0:%.*]] = icmp uge <16 x i8> [[A:%.*]], [[DOTSPLAT]]
1414 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
1415 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1416 // CHECK-NEXT:    ret i16 [[TMP2]]
1417 //
test_vcmpcsq_n_u8(uint8x16_t a,uint8_t b)1418 mve_pred16_t test_vcmpcsq_n_u8(uint8x16_t a, uint8_t b)
1419 {
1420 #ifdef POLYMORPHIC
1421     return vcmpcsq(a, b);
1422 #else /* POLYMORPHIC */
1423     return vcmpcsq_n_u8(a, b);
1424 #endif /* POLYMORPHIC */
1425 }
1426 
1427 // CHECK-LABEL: @test_vcmpcsq_n_u16(
1428 // CHECK-NEXT:  entry:
1429 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
1430 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
1431 // CHECK-NEXT:    [[TMP0:%.*]] = icmp uge <8 x i16> [[A:%.*]], [[DOTSPLAT]]
1432 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1433 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1434 // CHECK-NEXT:    ret i16 [[TMP2]]
1435 //
test_vcmpcsq_n_u16(uint16x8_t a,uint16_t b)1436 mve_pred16_t test_vcmpcsq_n_u16(uint16x8_t a, uint16_t b)
1437 {
1438 #ifdef POLYMORPHIC
1439     return vcmpcsq(a, b);
1440 #else /* POLYMORPHIC */
1441     return vcmpcsq_n_u16(a, b);
1442 #endif /* POLYMORPHIC */
1443 }
1444 
1445 // CHECK-LABEL: @test_vcmpcsq_n_u32(
1446 // CHECK-NEXT:  entry:
1447 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
1448 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
1449 // CHECK-NEXT:    [[TMP0:%.*]] = icmp uge <4 x i32> [[A:%.*]], [[DOTSPLAT]]
1450 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1451 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1452 // CHECK-NEXT:    ret i16 [[TMP2]]
1453 //
test_vcmpcsq_n_u32(uint32x4_t a,uint32_t b)1454 mve_pred16_t test_vcmpcsq_n_u32(uint32x4_t a, uint32_t b)
1455 {
1456 #ifdef POLYMORPHIC
1457     return vcmpcsq(a, b);
1458 #else /* POLYMORPHIC */
1459     return vcmpcsq_n_u32(a, b);
1460 #endif /* POLYMORPHIC */
1461 }
1462 
1463 // CHECK-LABEL: @test_vcmpgeq_m_f16(
1464 // CHECK-NEXT:  entry:
1465 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1466 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1467 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp oge <8 x half> [[A:%.*]], [[B:%.*]]
1468 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1469 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1470 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1471 // CHECK-NEXT:    ret i16 [[TMP5]]
1472 //
test_vcmpgeq_m_f16(float16x8_t a,float16x8_t b,mve_pred16_t p)1473 mve_pred16_t test_vcmpgeq_m_f16(float16x8_t a, float16x8_t b, mve_pred16_t p)
1474 {
1475 #ifdef POLYMORPHIC
1476     return vcmpgeq_m(a, b, p);
1477 #else /* POLYMORPHIC */
1478     return vcmpgeq_m_f16(a, b, p);
1479 #endif /* POLYMORPHIC */
1480 }
1481 
1482 // CHECK-LABEL: @test_vcmpgeq_m_f32(
1483 // CHECK-NEXT:  entry:
1484 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1485 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1486 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp oge <4 x float> [[A:%.*]], [[B:%.*]]
1487 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1488 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1489 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1490 // CHECK-NEXT:    ret i16 [[TMP5]]
1491 //
test_vcmpgeq_m_f32(float32x4_t a,float32x4_t b,mve_pred16_t p)1492 mve_pred16_t test_vcmpgeq_m_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)
1493 {
1494 #ifdef POLYMORPHIC
1495     return vcmpgeq_m(a, b, p);
1496 #else /* POLYMORPHIC */
1497     return vcmpgeq_m_f32(a, b, p);
1498 #endif /* POLYMORPHIC */
1499 }
1500 
1501 // CHECK-LABEL: @test_vcmpgeq_m_s8(
1502 // CHECK-NEXT:  entry:
1503 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1504 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1505 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sge <16 x i8> [[A:%.*]], [[B:%.*]]
1506 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
1507 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
1508 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1509 // CHECK-NEXT:    ret i16 [[TMP5]]
1510 //
test_vcmpgeq_m_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)1511 mve_pred16_t test_vcmpgeq_m_s8(int8x16_t a, int8x16_t b, mve_pred16_t p)
1512 {
1513 #ifdef POLYMORPHIC
1514     return vcmpgeq_m(a, b, p);
1515 #else /* POLYMORPHIC */
1516     return vcmpgeq_m_s8(a, b, p);
1517 #endif /* POLYMORPHIC */
1518 }
1519 
1520 // CHECK-LABEL: @test_vcmpgeq_m_s16(
1521 // CHECK-NEXT:  entry:
1522 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1523 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1524 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sge <8 x i16> [[A:%.*]], [[B:%.*]]
1525 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1526 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1527 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1528 // CHECK-NEXT:    ret i16 [[TMP5]]
1529 //
test_vcmpgeq_m_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)1530 mve_pred16_t test_vcmpgeq_m_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
1531 {
1532 #ifdef POLYMORPHIC
1533     return vcmpgeq_m(a, b, p);
1534 #else /* POLYMORPHIC */
1535     return vcmpgeq_m_s16(a, b, p);
1536 #endif /* POLYMORPHIC */
1537 }
1538 
1539 // CHECK-LABEL: @test_vcmpgeq_m_s32(
1540 // CHECK-NEXT:  entry:
1541 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1542 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1543 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sge <4 x i32> [[A:%.*]], [[B:%.*]]
1544 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1545 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1546 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1547 // CHECK-NEXT:    ret i16 [[TMP5]]
1548 //
test_vcmpgeq_m_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)1549 mve_pred16_t test_vcmpgeq_m_s32(int32x4_t a, int32x4_t b, mve_pred16_t p)
1550 {
1551 #ifdef POLYMORPHIC
1552     return vcmpgeq_m(a, b, p);
1553 #else /* POLYMORPHIC */
1554     return vcmpgeq_m_s32(a, b, p);
1555 #endif /* POLYMORPHIC */
1556 }
1557 
1558 // CHECK-LABEL: @test_vcmpcsq_m_u8(
1559 // CHECK-NEXT:  entry:
1560 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1561 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1562 // CHECK-NEXT:    [[TMP2:%.*]] = icmp uge <16 x i8> [[A:%.*]], [[B:%.*]]
1563 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
1564 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
1565 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1566 // CHECK-NEXT:    ret i16 [[TMP5]]
1567 //
test_vcmpcsq_m_u8(uint8x16_t a,uint8x16_t b,mve_pred16_t p)1568 mve_pred16_t test_vcmpcsq_m_u8(uint8x16_t a, uint8x16_t b, mve_pred16_t p)
1569 {
1570 #ifdef POLYMORPHIC
1571     return vcmpcsq_m(a, b, p);
1572 #else /* POLYMORPHIC */
1573     return vcmpcsq_m_u8(a, b, p);
1574 #endif /* POLYMORPHIC */
1575 }
1576 
1577 // CHECK-LABEL: @test_vcmpcsq_m_u16(
1578 // CHECK-NEXT:  entry:
1579 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1580 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1581 // CHECK-NEXT:    [[TMP2:%.*]] = icmp uge <8 x i16> [[A:%.*]], [[B:%.*]]
1582 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1583 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1584 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1585 // CHECK-NEXT:    ret i16 [[TMP5]]
1586 //
test_vcmpcsq_m_u16(uint16x8_t a,uint16x8_t b,mve_pred16_t p)1587 mve_pred16_t test_vcmpcsq_m_u16(uint16x8_t a, uint16x8_t b, mve_pred16_t p)
1588 {
1589 #ifdef POLYMORPHIC
1590     return vcmpcsq_m(a, b, p);
1591 #else /* POLYMORPHIC */
1592     return vcmpcsq_m_u16(a, b, p);
1593 #endif /* POLYMORPHIC */
1594 }
1595 
1596 // CHECK-LABEL: @test_vcmpcsq_m_u32(
1597 // CHECK-NEXT:  entry:
1598 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1599 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1600 // CHECK-NEXT:    [[TMP2:%.*]] = icmp uge <4 x i32> [[A:%.*]], [[B:%.*]]
1601 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1602 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1603 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1604 // CHECK-NEXT:    ret i16 [[TMP5]]
1605 //
test_vcmpcsq_m_u32(uint32x4_t a,uint32x4_t b,mve_pred16_t p)1606 mve_pred16_t test_vcmpcsq_m_u32(uint32x4_t a, uint32x4_t b, mve_pred16_t p)
1607 {
1608 #ifdef POLYMORPHIC
1609     return vcmpcsq_m(a, b, p);
1610 #else /* POLYMORPHIC */
1611     return vcmpcsq_m_u32(a, b, p);
1612 #endif /* POLYMORPHIC */
1613 }
1614 
1615 // CHECK-LABEL: @test_vcmpgeq_m_n_f16(
1616 // CHECK-NEXT:  entry:
1617 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1618 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1619 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
1620 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
1621 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp oge <8 x half> [[A:%.*]], [[DOTSPLAT]]
1622 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1623 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1624 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1625 // CHECK-NEXT:    ret i16 [[TMP5]]
1626 //
test_vcmpgeq_m_n_f16(float16x8_t a,float16_t b,mve_pred16_t p)1627 mve_pred16_t test_vcmpgeq_m_n_f16(float16x8_t a, float16_t b, mve_pred16_t p)
1628 {
1629 #ifdef POLYMORPHIC
1630     return vcmpgeq_m(a, b, p);
1631 #else /* POLYMORPHIC */
1632     return vcmpgeq_m_n_f16(a, b, p);
1633 #endif /* POLYMORPHIC */
1634 }
1635 
1636 // CHECK-LABEL: @test_vcmpgeq_m_n_f32(
1637 // CHECK-NEXT:  entry:
1638 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1639 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1640 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
1641 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
1642 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp oge <4 x float> [[A:%.*]], [[DOTSPLAT]]
1643 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1644 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1645 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1646 // CHECK-NEXT:    ret i16 [[TMP5]]
1647 //
test_vcmpgeq_m_n_f32(float32x4_t a,float32_t b,mve_pred16_t p)1648 mve_pred16_t test_vcmpgeq_m_n_f32(float32x4_t a, float32_t b, mve_pred16_t p)
1649 {
1650 #ifdef POLYMORPHIC
1651     return vcmpgeq_m(a, b, p);
1652 #else /* POLYMORPHIC */
1653     return vcmpgeq_m_n_f32(a, b, p);
1654 #endif /* POLYMORPHIC */
1655 }
1656 
1657 // CHECK-LABEL: @test_vcmpgeq_m_n_s8(
1658 // CHECK-NEXT:  entry:
1659 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1660 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1661 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
1662 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
1663 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sge <16 x i8> [[A:%.*]], [[DOTSPLAT]]
1664 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
1665 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
1666 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1667 // CHECK-NEXT:    ret i16 [[TMP5]]
1668 //
test_vcmpgeq_m_n_s8(int8x16_t a,int8_t b,mve_pred16_t p)1669 mve_pred16_t test_vcmpgeq_m_n_s8(int8x16_t a, int8_t b, mve_pred16_t p)
1670 {
1671 #ifdef POLYMORPHIC
1672     return vcmpgeq_m(a, b, p);
1673 #else /* POLYMORPHIC */
1674     return vcmpgeq_m_n_s8(a, b, p);
1675 #endif /* POLYMORPHIC */
1676 }
1677 
1678 // CHECK-LABEL: @test_vcmpgeq_m_n_s16(
1679 // CHECK-NEXT:  entry:
1680 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1681 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1682 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
1683 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
1684 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sge <8 x i16> [[A:%.*]], [[DOTSPLAT]]
1685 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1686 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1687 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1688 // CHECK-NEXT:    ret i16 [[TMP5]]
1689 //
test_vcmpgeq_m_n_s16(int16x8_t a,int16_t b,mve_pred16_t p)1690 mve_pred16_t test_vcmpgeq_m_n_s16(int16x8_t a, int16_t b, mve_pred16_t p)
1691 {
1692 #ifdef POLYMORPHIC
1693     return vcmpgeq_m(a, b, p);
1694 #else /* POLYMORPHIC */
1695     return vcmpgeq_m_n_s16(a, b, p);
1696 #endif /* POLYMORPHIC */
1697 }
1698 
1699 // CHECK-LABEL: @test_vcmpgeq_m_n_s32(
1700 // CHECK-NEXT:  entry:
1701 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1702 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1703 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
1704 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
1705 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sge <4 x i32> [[A:%.*]], [[DOTSPLAT]]
1706 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1707 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1708 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1709 // CHECK-NEXT:    ret i16 [[TMP5]]
1710 //
test_vcmpgeq_m_n_s32(int32x4_t a,int32_t b,mve_pred16_t p)1711 mve_pred16_t test_vcmpgeq_m_n_s32(int32x4_t a, int32_t b, mve_pred16_t p)
1712 {
1713 #ifdef POLYMORPHIC
1714     return vcmpgeq_m(a, b, p);
1715 #else /* POLYMORPHIC */
1716     return vcmpgeq_m_n_s32(a, b, p);
1717 #endif /* POLYMORPHIC */
1718 }
1719 
1720 // CHECK-LABEL: @test_vcmpcsq_m_n_u8(
1721 // CHECK-NEXT:  entry:
1722 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1723 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
1724 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
1725 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
1726 // CHECK-NEXT:    [[TMP2:%.*]] = icmp uge <16 x i8> [[A:%.*]], [[DOTSPLAT]]
1727 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
1728 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
1729 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1730 // CHECK-NEXT:    ret i16 [[TMP5]]
1731 //
test_vcmpcsq_m_n_u8(uint8x16_t a,uint8_t b,mve_pred16_t p)1732 mve_pred16_t test_vcmpcsq_m_n_u8(uint8x16_t a, uint8_t b, mve_pred16_t p)
1733 {
1734 #ifdef POLYMORPHIC
1735     return vcmpcsq_m(a, b, p);
1736 #else /* POLYMORPHIC */
1737     return vcmpcsq_m_n_u8(a, b, p);
1738 #endif /* POLYMORPHIC */
1739 }
1740 
1741 // CHECK-LABEL: @test_vcmpcsq_m_n_u16(
1742 // CHECK-NEXT:  entry:
1743 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1744 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
1745 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
1746 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
1747 // CHECK-NEXT:    [[TMP2:%.*]] = icmp uge <8 x i16> [[A:%.*]], [[DOTSPLAT]]
1748 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
1749 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
1750 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1751 // CHECK-NEXT:    ret i16 [[TMP5]]
1752 //
test_vcmpcsq_m_n_u16(uint16x8_t a,uint16_t b,mve_pred16_t p)1753 mve_pred16_t test_vcmpcsq_m_n_u16(uint16x8_t a, uint16_t b, mve_pred16_t p)
1754 {
1755 #ifdef POLYMORPHIC
1756     return vcmpcsq_m(a, b, p);
1757 #else /* POLYMORPHIC */
1758     return vcmpcsq_m_n_u16(a, b, p);
1759 #endif /* POLYMORPHIC */
1760 }
1761 
1762 // CHECK-LABEL: @test_vcmpcsq_m_n_u32(
1763 // CHECK-NEXT:  entry:
1764 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
1765 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
1766 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
1767 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
1768 // CHECK-NEXT:    [[TMP2:%.*]] = icmp uge <4 x i32> [[A:%.*]], [[DOTSPLAT]]
1769 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
1770 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
1771 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
1772 // CHECK-NEXT:    ret i16 [[TMP5]]
1773 //
test_vcmpcsq_m_n_u32(uint32x4_t a,uint32_t b,mve_pred16_t p)1774 mve_pred16_t test_vcmpcsq_m_n_u32(uint32x4_t a, uint32_t b, mve_pred16_t p)
1775 {
1776 #ifdef POLYMORPHIC
1777     return vcmpcsq_m(a, b, p);
1778 #else /* POLYMORPHIC */
1779     return vcmpcsq_m_n_u32(a, b, p);
1780 #endif /* POLYMORPHIC */
1781 }
1782 
1783 // CHECK-LABEL: @test_vcmpgtq_f16(
1784 // CHECK-NEXT:  entry:
1785 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp ogt <8 x half> [[A:%.*]], [[B:%.*]]
1786 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1787 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1788 // CHECK-NEXT:    ret i16 [[TMP2]]
1789 //
test_vcmpgtq_f16(float16x8_t a,float16x8_t b)1790 mve_pred16_t test_vcmpgtq_f16(float16x8_t a, float16x8_t b)
1791 {
1792 #ifdef POLYMORPHIC
1793     return vcmpgtq(a, b);
1794 #else /* POLYMORPHIC */
1795     return vcmpgtq_f16(a, b);
1796 #endif /* POLYMORPHIC */
1797 }
1798 
1799 // CHECK-LABEL: @test_vcmpgtq_f32(
1800 // CHECK-NEXT:  entry:
1801 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp ogt <4 x float> [[A:%.*]], [[B:%.*]]
1802 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1803 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1804 // CHECK-NEXT:    ret i16 [[TMP2]]
1805 //
test_vcmpgtq_f32(float32x4_t a,float32x4_t b)1806 mve_pred16_t test_vcmpgtq_f32(float32x4_t a, float32x4_t b)
1807 {
1808 #ifdef POLYMORPHIC
1809     return vcmpgtq(a, b);
1810 #else /* POLYMORPHIC */
1811     return vcmpgtq_f32(a, b);
1812 #endif /* POLYMORPHIC */
1813 }
1814 
1815 // CHECK-LABEL: @test_vcmpgtq_s8(
1816 // CHECK-NEXT:  entry:
1817 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sgt <16 x i8> [[A:%.*]], [[B:%.*]]
1818 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
1819 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1820 // CHECK-NEXT:    ret i16 [[TMP2]]
1821 //
test_vcmpgtq_s8(int8x16_t a,int8x16_t b)1822 mve_pred16_t test_vcmpgtq_s8(int8x16_t a, int8x16_t b)
1823 {
1824 #ifdef POLYMORPHIC
1825     return vcmpgtq(a, b);
1826 #else /* POLYMORPHIC */
1827     return vcmpgtq_s8(a, b);
1828 #endif /* POLYMORPHIC */
1829 }
1830 
1831 // CHECK-LABEL: @test_vcmpgtq_s16(
1832 // CHECK-NEXT:  entry:
1833 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sgt <8 x i16> [[A:%.*]], [[B:%.*]]
1834 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1835 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1836 // CHECK-NEXT:    ret i16 [[TMP2]]
1837 //
test_vcmpgtq_s16(int16x8_t a,int16x8_t b)1838 mve_pred16_t test_vcmpgtq_s16(int16x8_t a, int16x8_t b)
1839 {
1840 #ifdef POLYMORPHIC
1841     return vcmpgtq(a, b);
1842 #else /* POLYMORPHIC */
1843     return vcmpgtq_s16(a, b);
1844 #endif /* POLYMORPHIC */
1845 }
1846 
1847 // CHECK-LABEL: @test_vcmpgtq_s32(
1848 // CHECK-NEXT:  entry:
1849 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sgt <4 x i32> [[A:%.*]], [[B:%.*]]
1850 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1851 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1852 // CHECK-NEXT:    ret i16 [[TMP2]]
1853 //
test_vcmpgtq_s32(int32x4_t a,int32x4_t b)1854 mve_pred16_t test_vcmpgtq_s32(int32x4_t a, int32x4_t b)
1855 {
1856 #ifdef POLYMORPHIC
1857     return vcmpgtq(a, b);
1858 #else /* POLYMORPHIC */
1859     return vcmpgtq_s32(a, b);
1860 #endif /* POLYMORPHIC */
1861 }
1862 
1863 // CHECK-LABEL: @test_vcmphiq_u8(
1864 // CHECK-NEXT:  entry:
1865 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ugt <16 x i8> [[A:%.*]], [[B:%.*]]
1866 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
1867 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1868 // CHECK-NEXT:    ret i16 [[TMP2]]
1869 //
test_vcmphiq_u8(uint8x16_t a,uint8x16_t b)1870 mve_pred16_t test_vcmphiq_u8(uint8x16_t a, uint8x16_t b)
1871 {
1872 #ifdef POLYMORPHIC
1873     return vcmphiq(a, b);
1874 #else /* POLYMORPHIC */
1875     return vcmphiq_u8(a, b);
1876 #endif /* POLYMORPHIC */
1877 }
1878 
1879 // CHECK-LABEL: @test_vcmphiq_u16(
1880 // CHECK-NEXT:  entry:
1881 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ugt <8 x i16> [[A:%.*]], [[B:%.*]]
1882 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1883 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1884 // CHECK-NEXT:    ret i16 [[TMP2]]
1885 //
test_vcmphiq_u16(uint16x8_t a,uint16x8_t b)1886 mve_pred16_t test_vcmphiq_u16(uint16x8_t a, uint16x8_t b)
1887 {
1888 #ifdef POLYMORPHIC
1889     return vcmphiq(a, b);
1890 #else /* POLYMORPHIC */
1891     return vcmphiq_u16(a, b);
1892 #endif /* POLYMORPHIC */
1893 }
1894 
1895 // CHECK-LABEL: @test_vcmphiq_u32(
1896 // CHECK-NEXT:  entry:
1897 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ugt <4 x i32> [[A:%.*]], [[B:%.*]]
1898 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1899 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1900 // CHECK-NEXT:    ret i16 [[TMP2]]
1901 //
test_vcmphiq_u32(uint32x4_t a,uint32x4_t b)1902 mve_pred16_t test_vcmphiq_u32(uint32x4_t a, uint32x4_t b)
1903 {
1904 #ifdef POLYMORPHIC
1905     return vcmphiq(a, b);
1906 #else /* POLYMORPHIC */
1907     return vcmphiq_u32(a, b);
1908 #endif /* POLYMORPHIC */
1909 }
1910 
1911 // CHECK-LABEL: @test_vcmpgtq_n_f16(
1912 // CHECK-NEXT:  entry:
1913 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
1914 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
1915 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp ogt <8 x half> [[A:%.*]], [[DOTSPLAT]]
1916 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1917 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1918 // CHECK-NEXT:    ret i16 [[TMP2]]
1919 //
test_vcmpgtq_n_f16(float16x8_t a,float16_t b)1920 mve_pred16_t test_vcmpgtq_n_f16(float16x8_t a, float16_t b)
1921 {
1922 #ifdef POLYMORPHIC
1923     return vcmpgtq(a, b);
1924 #else /* POLYMORPHIC */
1925     return vcmpgtq_n_f16(a, b);
1926 #endif /* POLYMORPHIC */
1927 }
1928 
1929 // CHECK-LABEL: @test_vcmpgtq_n_f32(
1930 // CHECK-NEXT:  entry:
1931 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
1932 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
1933 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp ogt <4 x float> [[A:%.*]], [[DOTSPLAT]]
1934 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1935 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1936 // CHECK-NEXT:    ret i16 [[TMP2]]
1937 //
test_vcmpgtq_n_f32(float32x4_t a,float32_t b)1938 mve_pred16_t test_vcmpgtq_n_f32(float32x4_t a, float32_t b)
1939 {
1940 #ifdef POLYMORPHIC
1941     return vcmpgtq(a, b);
1942 #else /* POLYMORPHIC */
1943     return vcmpgtq_n_f32(a, b);
1944 #endif /* POLYMORPHIC */
1945 }
1946 
1947 // CHECK-LABEL: @test_vcmpgtq_n_s8(
1948 // CHECK-NEXT:  entry:
1949 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
1950 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
1951 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sgt <16 x i8> [[A:%.*]], [[DOTSPLAT]]
1952 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
1953 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1954 // CHECK-NEXT:    ret i16 [[TMP2]]
1955 //
test_vcmpgtq_n_s8(int8x16_t a,int8_t b)1956 mve_pred16_t test_vcmpgtq_n_s8(int8x16_t a, int8_t b)
1957 {
1958 #ifdef POLYMORPHIC
1959     return vcmpgtq(a, b);
1960 #else /* POLYMORPHIC */
1961     return vcmpgtq_n_s8(a, b);
1962 #endif /* POLYMORPHIC */
1963 }
1964 
1965 // CHECK-LABEL: @test_vcmpgtq_n_s16(
1966 // CHECK-NEXT:  entry:
1967 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
1968 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
1969 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sgt <8 x i16> [[A:%.*]], [[DOTSPLAT]]
1970 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
1971 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1972 // CHECK-NEXT:    ret i16 [[TMP2]]
1973 //
test_vcmpgtq_n_s16(int16x8_t a,int16_t b)1974 mve_pred16_t test_vcmpgtq_n_s16(int16x8_t a, int16_t b)
1975 {
1976 #ifdef POLYMORPHIC
1977     return vcmpgtq(a, b);
1978 #else /* POLYMORPHIC */
1979     return vcmpgtq_n_s16(a, b);
1980 #endif /* POLYMORPHIC */
1981 }
1982 
1983 // CHECK-LABEL: @test_vcmpgtq_n_s32(
1984 // CHECK-NEXT:  entry:
1985 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
1986 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
1987 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sgt <4 x i32> [[A:%.*]], [[DOTSPLAT]]
1988 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
1989 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
1990 // CHECK-NEXT:    ret i16 [[TMP2]]
1991 //
test_vcmpgtq_n_s32(int32x4_t a,int32_t b)1992 mve_pred16_t test_vcmpgtq_n_s32(int32x4_t a, int32_t b)
1993 {
1994 #ifdef POLYMORPHIC
1995     return vcmpgtq(a, b);
1996 #else /* POLYMORPHIC */
1997     return vcmpgtq_n_s32(a, b);
1998 #endif /* POLYMORPHIC */
1999 }
2000 
2001 // CHECK-LABEL: @test_vcmphiq_n_u8(
2002 // CHECK-NEXT:  entry:
2003 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
2004 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
2005 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ugt <16 x i8> [[A:%.*]], [[DOTSPLAT]]
2006 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
2007 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2008 // CHECK-NEXT:    ret i16 [[TMP2]]
2009 //
test_vcmphiq_n_u8(uint8x16_t a,uint8_t b)2010 mve_pred16_t test_vcmphiq_n_u8(uint8x16_t a, uint8_t b)
2011 {
2012 #ifdef POLYMORPHIC
2013     return vcmphiq(a, b);
2014 #else /* POLYMORPHIC */
2015     return vcmphiq_n_u8(a, b);
2016 #endif /* POLYMORPHIC */
2017 }
2018 
2019 // CHECK-LABEL: @test_vcmphiq_n_u16(
2020 // CHECK-NEXT:  entry:
2021 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
2022 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
2023 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ugt <8 x i16> [[A:%.*]], [[DOTSPLAT]]
2024 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2025 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2026 // CHECK-NEXT:    ret i16 [[TMP2]]
2027 //
test_vcmphiq_n_u16(uint16x8_t a,uint16_t b)2028 mve_pred16_t test_vcmphiq_n_u16(uint16x8_t a, uint16_t b)
2029 {
2030 #ifdef POLYMORPHIC
2031     return vcmphiq(a, b);
2032 #else /* POLYMORPHIC */
2033     return vcmphiq_n_u16(a, b);
2034 #endif /* POLYMORPHIC */
2035 }
2036 
2037 // CHECK-LABEL: @test_vcmphiq_n_u32(
2038 // CHECK-NEXT:  entry:
2039 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
2040 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
2041 // CHECK-NEXT:    [[TMP0:%.*]] = icmp ugt <4 x i32> [[A:%.*]], [[DOTSPLAT]]
2042 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2043 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2044 // CHECK-NEXT:    ret i16 [[TMP2]]
2045 //
test_vcmphiq_n_u32(uint32x4_t a,uint32_t b)2046 mve_pred16_t test_vcmphiq_n_u32(uint32x4_t a, uint32_t b)
2047 {
2048 #ifdef POLYMORPHIC
2049     return vcmphiq(a, b);
2050 #else /* POLYMORPHIC */
2051     return vcmphiq_n_u32(a, b);
2052 #endif /* POLYMORPHIC */
2053 }
2054 
2055 // CHECK-LABEL: @test_vcmpgtq_m_f16(
2056 // CHECK-NEXT:  entry:
2057 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2058 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2059 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp ogt <8 x half> [[A:%.*]], [[B:%.*]]
2060 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2061 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2062 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2063 // CHECK-NEXT:    ret i16 [[TMP5]]
2064 //
test_vcmpgtq_m_f16(float16x8_t a,float16x8_t b,mve_pred16_t p)2065 mve_pred16_t test_vcmpgtq_m_f16(float16x8_t a, float16x8_t b, mve_pred16_t p)
2066 {
2067 #ifdef POLYMORPHIC
2068     return vcmpgtq_m(a, b, p);
2069 #else /* POLYMORPHIC */
2070     return vcmpgtq_m_f16(a, b, p);
2071 #endif /* POLYMORPHIC */
2072 }
2073 
2074 // CHECK-LABEL: @test_vcmpgtq_m_f32(
2075 // CHECK-NEXT:  entry:
2076 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2077 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2078 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp ogt <4 x float> [[A:%.*]], [[B:%.*]]
2079 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2080 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2081 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2082 // CHECK-NEXT:    ret i16 [[TMP5]]
2083 //
test_vcmpgtq_m_f32(float32x4_t a,float32x4_t b,mve_pred16_t p)2084 mve_pred16_t test_vcmpgtq_m_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)
2085 {
2086 #ifdef POLYMORPHIC
2087     return vcmpgtq_m(a, b, p);
2088 #else /* POLYMORPHIC */
2089     return vcmpgtq_m_f32(a, b, p);
2090 #endif /* POLYMORPHIC */
2091 }
2092 
2093 // CHECK-LABEL: @test_vcmpgtq_m_s8(
2094 // CHECK-NEXT:  entry:
2095 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2096 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
2097 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sgt <16 x i8> [[A:%.*]], [[B:%.*]]
2098 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
2099 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
2100 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2101 // CHECK-NEXT:    ret i16 [[TMP5]]
2102 //
test_vcmpgtq_m_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)2103 mve_pred16_t test_vcmpgtq_m_s8(int8x16_t a, int8x16_t b, mve_pred16_t p)
2104 {
2105 #ifdef POLYMORPHIC
2106     return vcmpgtq_m(a, b, p);
2107 #else /* POLYMORPHIC */
2108     return vcmpgtq_m_s8(a, b, p);
2109 #endif /* POLYMORPHIC */
2110 }
2111 
2112 // CHECK-LABEL: @test_vcmpgtq_m_s16(
2113 // CHECK-NEXT:  entry:
2114 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2115 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2116 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sgt <8 x i16> [[A:%.*]], [[B:%.*]]
2117 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2118 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2119 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2120 // CHECK-NEXT:    ret i16 [[TMP5]]
2121 //
test_vcmpgtq_m_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)2122 mve_pred16_t test_vcmpgtq_m_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
2123 {
2124 #ifdef POLYMORPHIC
2125     return vcmpgtq_m(a, b, p);
2126 #else /* POLYMORPHIC */
2127     return vcmpgtq_m_s16(a, b, p);
2128 #endif /* POLYMORPHIC */
2129 }
2130 
2131 // CHECK-LABEL: @test_vcmpgtq_m_s32(
2132 // CHECK-NEXT:  entry:
2133 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2134 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2135 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sgt <4 x i32> [[A:%.*]], [[B:%.*]]
2136 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2137 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2138 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2139 // CHECK-NEXT:    ret i16 [[TMP5]]
2140 //
test_vcmpgtq_m_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)2141 mve_pred16_t test_vcmpgtq_m_s32(int32x4_t a, int32x4_t b, mve_pred16_t p)
2142 {
2143 #ifdef POLYMORPHIC
2144     return vcmpgtq_m(a, b, p);
2145 #else /* POLYMORPHIC */
2146     return vcmpgtq_m_s32(a, b, p);
2147 #endif /* POLYMORPHIC */
2148 }
2149 
2150 // CHECK-LABEL: @test_vcmphiq_m_u8(
2151 // CHECK-NEXT:  entry:
2152 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2153 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
2154 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ugt <16 x i8> [[A:%.*]], [[B:%.*]]
2155 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
2156 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
2157 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2158 // CHECK-NEXT:    ret i16 [[TMP5]]
2159 //
test_vcmphiq_m_u8(uint8x16_t a,uint8x16_t b,mve_pred16_t p)2160 mve_pred16_t test_vcmphiq_m_u8(uint8x16_t a, uint8x16_t b, mve_pred16_t p)
2161 {
2162 #ifdef POLYMORPHIC
2163     return vcmphiq_m(a, b, p);
2164 #else /* POLYMORPHIC */
2165     return vcmphiq_m_u8(a, b, p);
2166 #endif /* POLYMORPHIC */
2167 }
2168 
2169 // CHECK-LABEL: @test_vcmphiq_m_u16(
2170 // CHECK-NEXT:  entry:
2171 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2172 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2173 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ugt <8 x i16> [[A:%.*]], [[B:%.*]]
2174 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2175 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2176 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2177 // CHECK-NEXT:    ret i16 [[TMP5]]
2178 //
test_vcmphiq_m_u16(uint16x8_t a,uint16x8_t b,mve_pred16_t p)2179 mve_pred16_t test_vcmphiq_m_u16(uint16x8_t a, uint16x8_t b, mve_pred16_t p)
2180 {
2181 #ifdef POLYMORPHIC
2182     return vcmphiq_m(a, b, p);
2183 #else /* POLYMORPHIC */
2184     return vcmphiq_m_u16(a, b, p);
2185 #endif /* POLYMORPHIC */
2186 }
2187 
2188 // CHECK-LABEL: @test_vcmphiq_m_u32(
2189 // CHECK-NEXT:  entry:
2190 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2191 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2192 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ugt <4 x i32> [[A:%.*]], [[B:%.*]]
2193 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2194 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2195 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2196 // CHECK-NEXT:    ret i16 [[TMP5]]
2197 //
test_vcmphiq_m_u32(uint32x4_t a,uint32x4_t b,mve_pred16_t p)2198 mve_pred16_t test_vcmphiq_m_u32(uint32x4_t a, uint32x4_t b, mve_pred16_t p)
2199 {
2200 #ifdef POLYMORPHIC
2201     return vcmphiq_m(a, b, p);
2202 #else /* POLYMORPHIC */
2203     return vcmphiq_m_u32(a, b, p);
2204 #endif /* POLYMORPHIC */
2205 }
2206 
2207 // CHECK-LABEL: @test_vcmpgtq_m_n_f16(
2208 // CHECK-NEXT:  entry:
2209 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2210 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2211 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
2212 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
2213 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp ogt <8 x half> [[A:%.*]], [[DOTSPLAT]]
2214 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2215 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2216 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2217 // CHECK-NEXT:    ret i16 [[TMP5]]
2218 //
test_vcmpgtq_m_n_f16(float16x8_t a,float16_t b,mve_pred16_t p)2219 mve_pred16_t test_vcmpgtq_m_n_f16(float16x8_t a, float16_t b, mve_pred16_t p)
2220 {
2221 #ifdef POLYMORPHIC
2222     return vcmpgtq_m(a, b, p);
2223 #else /* POLYMORPHIC */
2224     return vcmpgtq_m_n_f16(a, b, p);
2225 #endif /* POLYMORPHIC */
2226 }
2227 
2228 // CHECK-LABEL: @test_vcmpgtq_m_n_f32(
2229 // CHECK-NEXT:  entry:
2230 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2231 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2232 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
2233 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
2234 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp ogt <4 x float> [[A:%.*]], [[DOTSPLAT]]
2235 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2236 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2237 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2238 // CHECK-NEXT:    ret i16 [[TMP5]]
2239 //
test_vcmpgtq_m_n_f32(float32x4_t a,float32_t b,mve_pred16_t p)2240 mve_pred16_t test_vcmpgtq_m_n_f32(float32x4_t a, float32_t b, mve_pred16_t p)
2241 {
2242 #ifdef POLYMORPHIC
2243     return vcmpgtq_m(a, b, p);
2244 #else /* POLYMORPHIC */
2245     return vcmpgtq_m_n_f32(a, b, p);
2246 #endif /* POLYMORPHIC */
2247 }
2248 
2249 // CHECK-LABEL: @test_vcmpgtq_m_n_s8(
2250 // CHECK-NEXT:  entry:
2251 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2252 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
2253 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
2254 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
2255 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sgt <16 x i8> [[A:%.*]], [[DOTSPLAT]]
2256 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
2257 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
2258 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2259 // CHECK-NEXT:    ret i16 [[TMP5]]
2260 //
test_vcmpgtq_m_n_s8(int8x16_t a,int8_t b,mve_pred16_t p)2261 mve_pred16_t test_vcmpgtq_m_n_s8(int8x16_t a, int8_t b, mve_pred16_t p)
2262 {
2263 #ifdef POLYMORPHIC
2264     return vcmpgtq_m(a, b, p);
2265 #else /* POLYMORPHIC */
2266     return vcmpgtq_m_n_s8(a, b, p);
2267 #endif /* POLYMORPHIC */
2268 }
2269 
2270 // CHECK-LABEL: @test_vcmpgtq_m_n_s16(
2271 // CHECK-NEXT:  entry:
2272 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2273 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2274 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
2275 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
2276 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sgt <8 x i16> [[A:%.*]], [[DOTSPLAT]]
2277 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2278 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2279 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2280 // CHECK-NEXT:    ret i16 [[TMP5]]
2281 //
test_vcmpgtq_m_n_s16(int16x8_t a,int16_t b,mve_pred16_t p)2282 mve_pred16_t test_vcmpgtq_m_n_s16(int16x8_t a, int16_t b, mve_pred16_t p)
2283 {
2284 #ifdef POLYMORPHIC
2285     return vcmpgtq_m(a, b, p);
2286 #else /* POLYMORPHIC */
2287     return vcmpgtq_m_n_s16(a, b, p);
2288 #endif /* POLYMORPHIC */
2289 }
2290 
2291 // CHECK-LABEL: @test_vcmpgtq_m_n_s32(
2292 // CHECK-NEXT:  entry:
2293 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2294 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2295 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
2296 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
2297 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sgt <4 x i32> [[A:%.*]], [[DOTSPLAT]]
2298 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2299 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2300 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2301 // CHECK-NEXT:    ret i16 [[TMP5]]
2302 //
test_vcmpgtq_m_n_s32(int32x4_t a,int32_t b,mve_pred16_t p)2303 mve_pred16_t test_vcmpgtq_m_n_s32(int32x4_t a, int32_t b, mve_pred16_t p)
2304 {
2305 #ifdef POLYMORPHIC
2306     return vcmpgtq_m(a, b, p);
2307 #else /* POLYMORPHIC */
2308     return vcmpgtq_m_n_s32(a, b, p);
2309 #endif /* POLYMORPHIC */
2310 }
2311 
2312 // CHECK-LABEL: @test_vcmphiq_m_n_u8(
2313 // CHECK-NEXT:  entry:
2314 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2315 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
2316 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
2317 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
2318 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ugt <16 x i8> [[A:%.*]], [[DOTSPLAT]]
2319 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
2320 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
2321 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2322 // CHECK-NEXT:    ret i16 [[TMP5]]
2323 //
test_vcmphiq_m_n_u8(uint8x16_t a,uint8_t b,mve_pred16_t p)2324 mve_pred16_t test_vcmphiq_m_n_u8(uint8x16_t a, uint8_t b, mve_pred16_t p)
2325 {
2326 #ifdef POLYMORPHIC
2327     return vcmphiq_m(a, b, p);
2328 #else /* POLYMORPHIC */
2329     return vcmphiq_m_n_u8(a, b, p);
2330 #endif /* POLYMORPHIC */
2331 }
2332 
2333 // CHECK-LABEL: @test_vcmphiq_m_n_u16(
2334 // CHECK-NEXT:  entry:
2335 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2336 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2337 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
2338 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
2339 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ugt <8 x i16> [[A:%.*]], [[DOTSPLAT]]
2340 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2341 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2342 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2343 // CHECK-NEXT:    ret i16 [[TMP5]]
2344 //
test_vcmphiq_m_n_u16(uint16x8_t a,uint16_t b,mve_pred16_t p)2345 mve_pred16_t test_vcmphiq_m_n_u16(uint16x8_t a, uint16_t b, mve_pred16_t p)
2346 {
2347 #ifdef POLYMORPHIC
2348     return vcmphiq_m(a, b, p);
2349 #else /* POLYMORPHIC */
2350     return vcmphiq_m_n_u16(a, b, p);
2351 #endif /* POLYMORPHIC */
2352 }
2353 
2354 // CHECK-LABEL: @test_vcmphiq_m_n_u32(
2355 // CHECK-NEXT:  entry:
2356 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2357 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2358 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
2359 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
2360 // CHECK-NEXT:    [[TMP2:%.*]] = icmp ugt <4 x i32> [[A:%.*]], [[DOTSPLAT]]
2361 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2362 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2363 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2364 // CHECK-NEXT:    ret i16 [[TMP5]]
2365 //
test_vcmphiq_m_n_u32(uint32x4_t a,uint32_t b,mve_pred16_t p)2366 mve_pred16_t test_vcmphiq_m_n_u32(uint32x4_t a, uint32_t b, mve_pred16_t p)
2367 {
2368 #ifdef POLYMORPHIC
2369     return vcmphiq_m(a, b, p);
2370 #else /* POLYMORPHIC */
2371     return vcmphiq_m_n_u32(a, b, p);
2372 #endif /* POLYMORPHIC */
2373 }
2374 
2375 // CHECK-LABEL: @test_vcmpleq_f16(
2376 // CHECK-NEXT:  entry:
2377 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp ole <8 x half> [[A:%.*]], [[B:%.*]]
2378 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2379 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2380 // CHECK-NEXT:    ret i16 [[TMP2]]
2381 //
test_vcmpleq_f16(float16x8_t a,float16x8_t b)2382 mve_pred16_t test_vcmpleq_f16(float16x8_t a, float16x8_t b)
2383 {
2384 #ifdef POLYMORPHIC
2385     return vcmpleq(a, b);
2386 #else /* POLYMORPHIC */
2387     return vcmpleq_f16(a, b);
2388 #endif /* POLYMORPHIC */
2389 }
2390 
2391 // CHECK-LABEL: @test_vcmpleq_f32(
2392 // CHECK-NEXT:  entry:
2393 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp ole <4 x float> [[A:%.*]], [[B:%.*]]
2394 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2395 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2396 // CHECK-NEXT:    ret i16 [[TMP2]]
2397 //
test_vcmpleq_f32(float32x4_t a,float32x4_t b)2398 mve_pred16_t test_vcmpleq_f32(float32x4_t a, float32x4_t b)
2399 {
2400 #ifdef POLYMORPHIC
2401     return vcmpleq(a, b);
2402 #else /* POLYMORPHIC */
2403     return vcmpleq_f32(a, b);
2404 #endif /* POLYMORPHIC */
2405 }
2406 
2407 // CHECK-LABEL: @test_vcmpleq_s8(
2408 // CHECK-NEXT:  entry:
2409 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sle <16 x i8> [[A:%.*]], [[B:%.*]]
2410 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
2411 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2412 // CHECK-NEXT:    ret i16 [[TMP2]]
2413 //
test_vcmpleq_s8(int8x16_t a,int8x16_t b)2414 mve_pred16_t test_vcmpleq_s8(int8x16_t a, int8x16_t b)
2415 {
2416 #ifdef POLYMORPHIC
2417     return vcmpleq(a, b);
2418 #else /* POLYMORPHIC */
2419     return vcmpleq_s8(a, b);
2420 #endif /* POLYMORPHIC */
2421 }
2422 
2423 // CHECK-LABEL: @test_vcmpleq_s16(
2424 // CHECK-NEXT:  entry:
2425 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sle <8 x i16> [[A:%.*]], [[B:%.*]]
2426 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2427 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2428 // CHECK-NEXT:    ret i16 [[TMP2]]
2429 //
test_vcmpleq_s16(int16x8_t a,int16x8_t b)2430 mve_pred16_t test_vcmpleq_s16(int16x8_t a, int16x8_t b)
2431 {
2432 #ifdef POLYMORPHIC
2433     return vcmpleq(a, b);
2434 #else /* POLYMORPHIC */
2435     return vcmpleq_s16(a, b);
2436 #endif /* POLYMORPHIC */
2437 }
2438 
2439 // CHECK-LABEL: @test_vcmpleq_s32(
2440 // CHECK-NEXT:  entry:
2441 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sle <4 x i32> [[A:%.*]], [[B:%.*]]
2442 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2443 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2444 // CHECK-NEXT:    ret i16 [[TMP2]]
2445 //
test_vcmpleq_s32(int32x4_t a,int32x4_t b)2446 mve_pred16_t test_vcmpleq_s32(int32x4_t a, int32x4_t b)
2447 {
2448 #ifdef POLYMORPHIC
2449     return vcmpleq(a, b);
2450 #else /* POLYMORPHIC */
2451     return vcmpleq_s32(a, b);
2452 #endif /* POLYMORPHIC */
2453 }
2454 
2455 // CHECK-LABEL: @test_vcmpleq_n_f16(
2456 // CHECK-NEXT:  entry:
2457 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
2458 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
2459 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp ole <8 x half> [[A:%.*]], [[DOTSPLAT]]
2460 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2461 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2462 // CHECK-NEXT:    ret i16 [[TMP2]]
2463 //
test_vcmpleq_n_f16(float16x8_t a,float16_t b)2464 mve_pred16_t test_vcmpleq_n_f16(float16x8_t a, float16_t b)
2465 {
2466 #ifdef POLYMORPHIC
2467     return vcmpleq(a, b);
2468 #else /* POLYMORPHIC */
2469     return vcmpleq_n_f16(a, b);
2470 #endif /* POLYMORPHIC */
2471 }
2472 
2473 // CHECK-LABEL: @test_vcmpleq_n_f32(
2474 // CHECK-NEXT:  entry:
2475 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
2476 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
2477 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp ole <4 x float> [[A:%.*]], [[DOTSPLAT]]
2478 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2479 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2480 // CHECK-NEXT:    ret i16 [[TMP2]]
2481 //
test_vcmpleq_n_f32(float32x4_t a,float32_t b)2482 mve_pred16_t test_vcmpleq_n_f32(float32x4_t a, float32_t b)
2483 {
2484 #ifdef POLYMORPHIC
2485     return vcmpleq(a, b);
2486 #else /* POLYMORPHIC */
2487     return vcmpleq_n_f32(a, b);
2488 #endif /* POLYMORPHIC */
2489 }
2490 
2491 // CHECK-LABEL: @test_vcmpleq_n_s8(
2492 // CHECK-NEXT:  entry:
2493 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
2494 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
2495 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sle <16 x i8> [[A:%.*]], [[DOTSPLAT]]
2496 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
2497 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2498 // CHECK-NEXT:    ret i16 [[TMP2]]
2499 //
test_vcmpleq_n_s8(int8x16_t a,int8_t b)2500 mve_pred16_t test_vcmpleq_n_s8(int8x16_t a, int8_t b)
2501 {
2502 #ifdef POLYMORPHIC
2503     return vcmpleq(a, b);
2504 #else /* POLYMORPHIC */
2505     return vcmpleq_n_s8(a, b);
2506 #endif /* POLYMORPHIC */
2507 }
2508 
2509 // CHECK-LABEL: @test_vcmpleq_n_s16(
2510 // CHECK-NEXT:  entry:
2511 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
2512 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
2513 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sle <8 x i16> [[A:%.*]], [[DOTSPLAT]]
2514 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2515 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2516 // CHECK-NEXT:    ret i16 [[TMP2]]
2517 //
test_vcmpleq_n_s16(int16x8_t a,int16_t b)2518 mve_pred16_t test_vcmpleq_n_s16(int16x8_t a, int16_t b)
2519 {
2520 #ifdef POLYMORPHIC
2521     return vcmpleq(a, b);
2522 #else /* POLYMORPHIC */
2523     return vcmpleq_n_s16(a, b);
2524 #endif /* POLYMORPHIC */
2525 }
2526 
2527 // CHECK-LABEL: @test_vcmpleq_n_s32(
2528 // CHECK-NEXT:  entry:
2529 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
2530 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
2531 // CHECK-NEXT:    [[TMP0:%.*]] = icmp sle <4 x i32> [[A:%.*]], [[DOTSPLAT]]
2532 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2533 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2534 // CHECK-NEXT:    ret i16 [[TMP2]]
2535 //
test_vcmpleq_n_s32(int32x4_t a,int32_t b)2536 mve_pred16_t test_vcmpleq_n_s32(int32x4_t a, int32_t b)
2537 {
2538 #ifdef POLYMORPHIC
2539     return vcmpleq(a, b);
2540 #else /* POLYMORPHIC */
2541     return vcmpleq_n_s32(a, b);
2542 #endif /* POLYMORPHIC */
2543 }
2544 
2545 // CHECK-LABEL: @test_vcmpleq_m_f16(
2546 // CHECK-NEXT:  entry:
2547 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2548 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2549 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp ole <8 x half> [[A:%.*]], [[B:%.*]]
2550 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2551 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2552 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2553 // CHECK-NEXT:    ret i16 [[TMP5]]
2554 //
test_vcmpleq_m_f16(float16x8_t a,float16x8_t b,mve_pred16_t p)2555 mve_pred16_t test_vcmpleq_m_f16(float16x8_t a, float16x8_t b, mve_pred16_t p)
2556 {
2557 #ifdef POLYMORPHIC
2558     return vcmpleq_m(a, b, p);
2559 #else /* POLYMORPHIC */
2560     return vcmpleq_m_f16(a, b, p);
2561 #endif /* POLYMORPHIC */
2562 }
2563 
2564 // CHECK-LABEL: @test_vcmpleq_m_f32(
2565 // CHECK-NEXT:  entry:
2566 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2567 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2568 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp ole <4 x float> [[A:%.*]], [[B:%.*]]
2569 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2570 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2571 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2572 // CHECK-NEXT:    ret i16 [[TMP5]]
2573 //
test_vcmpleq_m_f32(float32x4_t a,float32x4_t b,mve_pred16_t p)2574 mve_pred16_t test_vcmpleq_m_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)
2575 {
2576 #ifdef POLYMORPHIC
2577     return vcmpleq_m(a, b, p);
2578 #else /* POLYMORPHIC */
2579     return vcmpleq_m_f32(a, b, p);
2580 #endif /* POLYMORPHIC */
2581 }
2582 
2583 // CHECK-LABEL: @test_vcmpleq_m_s8(
2584 // CHECK-NEXT:  entry:
2585 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2586 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
2587 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sle <16 x i8> [[A:%.*]], [[B:%.*]]
2588 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
2589 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
2590 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2591 // CHECK-NEXT:    ret i16 [[TMP5]]
2592 //
test_vcmpleq_m_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)2593 mve_pred16_t test_vcmpleq_m_s8(int8x16_t a, int8x16_t b, mve_pred16_t p)
2594 {
2595 #ifdef POLYMORPHIC
2596     return vcmpleq_m(a, b, p);
2597 #else /* POLYMORPHIC */
2598     return vcmpleq_m_s8(a, b, p);
2599 #endif /* POLYMORPHIC */
2600 }
2601 
2602 // CHECK-LABEL: @test_vcmpleq_m_s16(
2603 // CHECK-NEXT:  entry:
2604 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2605 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2606 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sle <8 x i16> [[A:%.*]], [[B:%.*]]
2607 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2608 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2609 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2610 // CHECK-NEXT:    ret i16 [[TMP5]]
2611 //
test_vcmpleq_m_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)2612 mve_pred16_t test_vcmpleq_m_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
2613 {
2614 #ifdef POLYMORPHIC
2615     return vcmpleq_m(a, b, p);
2616 #else /* POLYMORPHIC */
2617     return vcmpleq_m_s16(a, b, p);
2618 #endif /* POLYMORPHIC */
2619 }
2620 
2621 // CHECK-LABEL: @test_vcmpleq_m_s32(
2622 // CHECK-NEXT:  entry:
2623 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2624 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2625 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sle <4 x i32> [[A:%.*]], [[B:%.*]]
2626 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2627 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2628 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2629 // CHECK-NEXT:    ret i16 [[TMP5]]
2630 //
test_vcmpleq_m_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)2631 mve_pred16_t test_vcmpleq_m_s32(int32x4_t a, int32x4_t b, mve_pred16_t p)
2632 {
2633 #ifdef POLYMORPHIC
2634     return vcmpleq_m(a, b, p);
2635 #else /* POLYMORPHIC */
2636     return vcmpleq_m_s32(a, b, p);
2637 #endif /* POLYMORPHIC */
2638 }
2639 
2640 // CHECK-LABEL: @test_vcmpleq_m_n_f16(
2641 // CHECK-NEXT:  entry:
2642 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2643 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2644 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
2645 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
2646 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp ole <8 x half> [[A:%.*]], [[DOTSPLAT]]
2647 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2648 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2649 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2650 // CHECK-NEXT:    ret i16 [[TMP5]]
2651 //
test_vcmpleq_m_n_f16(float16x8_t a,float16_t b,mve_pred16_t p)2652 mve_pred16_t test_vcmpleq_m_n_f16(float16x8_t a, float16_t b, mve_pred16_t p)
2653 {
2654 #ifdef POLYMORPHIC
2655     return vcmpleq_m(a, b, p);
2656 #else /* POLYMORPHIC */
2657     return vcmpleq_m_n_f16(a, b, p);
2658 #endif /* POLYMORPHIC */
2659 }
2660 
2661 // CHECK-LABEL: @test_vcmpleq_m_n_f32(
2662 // CHECK-NEXT:  entry:
2663 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2664 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2665 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
2666 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
2667 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp ole <4 x float> [[A:%.*]], [[DOTSPLAT]]
2668 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2669 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2670 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2671 // CHECK-NEXT:    ret i16 [[TMP5]]
2672 //
test_vcmpleq_m_n_f32(float32x4_t a,float32_t b,mve_pred16_t p)2673 mve_pred16_t test_vcmpleq_m_n_f32(float32x4_t a, float32_t b, mve_pred16_t p)
2674 {
2675 #ifdef POLYMORPHIC
2676     return vcmpleq_m(a, b, p);
2677 #else /* POLYMORPHIC */
2678     return vcmpleq_m_n_f32(a, b, p);
2679 #endif /* POLYMORPHIC */
2680 }
2681 
2682 // CHECK-LABEL: @test_vcmpleq_m_n_s8(
2683 // CHECK-NEXT:  entry:
2684 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2685 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
2686 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
2687 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
2688 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sle <16 x i8> [[A:%.*]], [[DOTSPLAT]]
2689 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
2690 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
2691 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2692 // CHECK-NEXT:    ret i16 [[TMP5]]
2693 //
test_vcmpleq_m_n_s8(int8x16_t a,int8_t b,mve_pred16_t p)2694 mve_pred16_t test_vcmpleq_m_n_s8(int8x16_t a, int8_t b, mve_pred16_t p)
2695 {
2696 #ifdef POLYMORPHIC
2697     return vcmpleq_m(a, b, p);
2698 #else /* POLYMORPHIC */
2699     return vcmpleq_m_n_s8(a, b, p);
2700 #endif /* POLYMORPHIC */
2701 }
2702 
2703 // CHECK-LABEL: @test_vcmpleq_m_n_s16(
2704 // CHECK-NEXT:  entry:
2705 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2706 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2707 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
2708 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
2709 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sle <8 x i16> [[A:%.*]], [[DOTSPLAT]]
2710 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2711 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2712 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2713 // CHECK-NEXT:    ret i16 [[TMP5]]
2714 //
test_vcmpleq_m_n_s16(int16x8_t a,int16_t b,mve_pred16_t p)2715 mve_pred16_t test_vcmpleq_m_n_s16(int16x8_t a, int16_t b, mve_pred16_t p)
2716 {
2717 #ifdef POLYMORPHIC
2718     return vcmpleq_m(a, b, p);
2719 #else /* POLYMORPHIC */
2720     return vcmpleq_m_n_s16(a, b, p);
2721 #endif /* POLYMORPHIC */
2722 }
2723 
2724 // CHECK-LABEL: @test_vcmpleq_m_n_s32(
2725 // CHECK-NEXT:  entry:
2726 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2727 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2728 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
2729 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
2730 // CHECK-NEXT:    [[TMP2:%.*]] = icmp sle <4 x i32> [[A:%.*]], [[DOTSPLAT]]
2731 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2732 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2733 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2734 // CHECK-NEXT:    ret i16 [[TMP5]]
2735 //
test_vcmpleq_m_n_s32(int32x4_t a,int32_t b,mve_pred16_t p)2736 mve_pred16_t test_vcmpleq_m_n_s32(int32x4_t a, int32_t b, mve_pred16_t p)
2737 {
2738 #ifdef POLYMORPHIC
2739     return vcmpleq_m(a, b, p);
2740 #else /* POLYMORPHIC */
2741     return vcmpleq_m_n_s32(a, b, p);
2742 #endif /* POLYMORPHIC */
2743 }
2744 
2745 // CHECK-LABEL: @test_vcmpltq_f16(
2746 // CHECK-NEXT:  entry:
2747 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp olt <8 x half> [[A:%.*]], [[B:%.*]]
2748 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2749 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2750 // CHECK-NEXT:    ret i16 [[TMP2]]
2751 //
test_vcmpltq_f16(float16x8_t a,float16x8_t b)2752 mve_pred16_t test_vcmpltq_f16(float16x8_t a, float16x8_t b)
2753 {
2754 #ifdef POLYMORPHIC
2755     return vcmpltq(a, b);
2756 #else /* POLYMORPHIC */
2757     return vcmpltq_f16(a, b);
2758 #endif /* POLYMORPHIC */
2759 }
2760 
2761 // CHECK-LABEL: @test_vcmpltq_f32(
2762 // CHECK-NEXT:  entry:
2763 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp olt <4 x float> [[A:%.*]], [[B:%.*]]
2764 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2765 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2766 // CHECK-NEXT:    ret i16 [[TMP2]]
2767 //
test_vcmpltq_f32(float32x4_t a,float32x4_t b)2768 mve_pred16_t test_vcmpltq_f32(float32x4_t a, float32x4_t b)
2769 {
2770 #ifdef POLYMORPHIC
2771     return vcmpltq(a, b);
2772 #else /* POLYMORPHIC */
2773     return vcmpltq_f32(a, b);
2774 #endif /* POLYMORPHIC */
2775 }
2776 
2777 // CHECK-LABEL: @test_vcmpltq_s8(
2778 // CHECK-NEXT:  entry:
2779 // CHECK-NEXT:    [[TMP0:%.*]] = icmp slt <16 x i8> [[A:%.*]], [[B:%.*]]
2780 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
2781 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2782 // CHECK-NEXT:    ret i16 [[TMP2]]
2783 //
test_vcmpltq_s8(int8x16_t a,int8x16_t b)2784 mve_pred16_t test_vcmpltq_s8(int8x16_t a, int8x16_t b)
2785 {
2786 #ifdef POLYMORPHIC
2787     return vcmpltq(a, b);
2788 #else /* POLYMORPHIC */
2789     return vcmpltq_s8(a, b);
2790 #endif /* POLYMORPHIC */
2791 }
2792 
2793 // CHECK-LABEL: @test_vcmpltq_s16(
2794 // CHECK-NEXT:  entry:
2795 // CHECK-NEXT:    [[TMP0:%.*]] = icmp slt <8 x i16> [[A:%.*]], [[B:%.*]]
2796 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2797 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2798 // CHECK-NEXT:    ret i16 [[TMP2]]
2799 //
test_vcmpltq_s16(int16x8_t a,int16x8_t b)2800 mve_pred16_t test_vcmpltq_s16(int16x8_t a, int16x8_t b)
2801 {
2802 #ifdef POLYMORPHIC
2803     return vcmpltq(a, b);
2804 #else /* POLYMORPHIC */
2805     return vcmpltq_s16(a, b);
2806 #endif /* POLYMORPHIC */
2807 }
2808 
2809 // CHECK-LABEL: @test_vcmpltq_s32(
2810 // CHECK-NEXT:  entry:
2811 // CHECK-NEXT:    [[TMP0:%.*]] = icmp slt <4 x i32> [[A:%.*]], [[B:%.*]]
2812 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2813 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2814 // CHECK-NEXT:    ret i16 [[TMP2]]
2815 //
test_vcmpltq_s32(int32x4_t a,int32x4_t b)2816 mve_pred16_t test_vcmpltq_s32(int32x4_t a, int32x4_t b)
2817 {
2818 #ifdef POLYMORPHIC
2819     return vcmpltq(a, b);
2820 #else /* POLYMORPHIC */
2821     return vcmpltq_s32(a, b);
2822 #endif /* POLYMORPHIC */
2823 }
2824 
2825 // CHECK-LABEL: @test_vcmpltq_n_f16(
2826 // CHECK-NEXT:  entry:
2827 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
2828 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
2829 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp olt <8 x half> [[A:%.*]], [[DOTSPLAT]]
2830 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2831 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2832 // CHECK-NEXT:    ret i16 [[TMP2]]
2833 //
test_vcmpltq_n_f16(float16x8_t a,float16_t b)2834 mve_pred16_t test_vcmpltq_n_f16(float16x8_t a, float16_t b)
2835 {
2836 #ifdef POLYMORPHIC
2837     return vcmpltq(a, b);
2838 #else /* POLYMORPHIC */
2839     return vcmpltq_n_f16(a, b);
2840 #endif /* POLYMORPHIC */
2841 }
2842 
2843 // CHECK-LABEL: @test_vcmpltq_n_f32(
2844 // CHECK-NEXT:  entry:
2845 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
2846 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
2847 // CHECK-NEXT:    [[TMP0:%.*]] = fcmp olt <4 x float> [[A:%.*]], [[DOTSPLAT]]
2848 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2849 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2850 // CHECK-NEXT:    ret i16 [[TMP2]]
2851 //
test_vcmpltq_n_f32(float32x4_t a,float32_t b)2852 mve_pred16_t test_vcmpltq_n_f32(float32x4_t a, float32_t b)
2853 {
2854 #ifdef POLYMORPHIC
2855     return vcmpltq(a, b);
2856 #else /* POLYMORPHIC */
2857     return vcmpltq_n_f32(a, b);
2858 #endif /* POLYMORPHIC */
2859 }
2860 
2861 // CHECK-LABEL: @test_vcmpltq_n_s8(
2862 // CHECK-NEXT:  entry:
2863 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
2864 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
2865 // CHECK-NEXT:    [[TMP0:%.*]] = icmp slt <16 x i8> [[A:%.*]], [[DOTSPLAT]]
2866 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP0]])
2867 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2868 // CHECK-NEXT:    ret i16 [[TMP2]]
2869 //
test_vcmpltq_n_s8(int8x16_t a,int8_t b)2870 mve_pred16_t test_vcmpltq_n_s8(int8x16_t a, int8_t b)
2871 {
2872 #ifdef POLYMORPHIC
2873     return vcmpltq(a, b);
2874 #else /* POLYMORPHIC */
2875     return vcmpltq_n_s8(a, b);
2876 #endif /* POLYMORPHIC */
2877 }
2878 
2879 // CHECK-LABEL: @test_vcmpltq_n_s16(
2880 // CHECK-NEXT:  entry:
2881 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
2882 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
2883 // CHECK-NEXT:    [[TMP0:%.*]] = icmp slt <8 x i16> [[A:%.*]], [[DOTSPLAT]]
2884 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP0]])
2885 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2886 // CHECK-NEXT:    ret i16 [[TMP2]]
2887 //
test_vcmpltq_n_s16(int16x8_t a,int16_t b)2888 mve_pred16_t test_vcmpltq_n_s16(int16x8_t a, int16_t b)
2889 {
2890 #ifdef POLYMORPHIC
2891     return vcmpltq(a, b);
2892 #else /* POLYMORPHIC */
2893     return vcmpltq_n_s16(a, b);
2894 #endif /* POLYMORPHIC */
2895 }
2896 
2897 // CHECK-LABEL: @test_vcmpltq_n_s32(
2898 // CHECK-NEXT:  entry:
2899 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
2900 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
2901 // CHECK-NEXT:    [[TMP0:%.*]] = icmp slt <4 x i32> [[A:%.*]], [[DOTSPLAT]]
2902 // CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP0]])
2903 // CHECK-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i16
2904 // CHECK-NEXT:    ret i16 [[TMP2]]
2905 //
test_vcmpltq_n_s32(int32x4_t a,int32_t b)2906 mve_pred16_t test_vcmpltq_n_s32(int32x4_t a, int32_t b)
2907 {
2908 #ifdef POLYMORPHIC
2909     return vcmpltq(a, b);
2910 #else /* POLYMORPHIC */
2911     return vcmpltq_n_s32(a, b);
2912 #endif /* POLYMORPHIC */
2913 }
2914 
2915 // CHECK-LABEL: @test_vcmpltq_m_f16(
2916 // CHECK-NEXT:  entry:
2917 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2918 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2919 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp olt <8 x half> [[A:%.*]], [[B:%.*]]
2920 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2921 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2922 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2923 // CHECK-NEXT:    ret i16 [[TMP5]]
2924 //
test_vcmpltq_m_f16(float16x8_t a,float16x8_t b,mve_pred16_t p)2925 mve_pred16_t test_vcmpltq_m_f16(float16x8_t a, float16x8_t b, mve_pred16_t p)
2926 {
2927 #ifdef POLYMORPHIC
2928     return vcmpltq_m(a, b, p);
2929 #else /* POLYMORPHIC */
2930     return vcmpltq_m_f16(a, b, p);
2931 #endif /* POLYMORPHIC */
2932 }
2933 
2934 // CHECK-LABEL: @test_vcmpltq_m_f32(
2935 // CHECK-NEXT:  entry:
2936 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2937 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2938 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp olt <4 x float> [[A:%.*]], [[B:%.*]]
2939 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2940 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2941 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2942 // CHECK-NEXT:    ret i16 [[TMP5]]
2943 //
test_vcmpltq_m_f32(float32x4_t a,float32x4_t b,mve_pred16_t p)2944 mve_pred16_t test_vcmpltq_m_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)
2945 {
2946 #ifdef POLYMORPHIC
2947     return vcmpltq_m(a, b, p);
2948 #else /* POLYMORPHIC */
2949     return vcmpltq_m_f32(a, b, p);
2950 #endif /* POLYMORPHIC */
2951 }
2952 
2953 // CHECK-LABEL: @test_vcmpltq_m_s8(
2954 // CHECK-NEXT:  entry:
2955 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2956 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
2957 // CHECK-NEXT:    [[TMP2:%.*]] = icmp slt <16 x i8> [[A:%.*]], [[B:%.*]]
2958 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
2959 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
2960 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2961 // CHECK-NEXT:    ret i16 [[TMP5]]
2962 //
test_vcmpltq_m_s8(int8x16_t a,int8x16_t b,mve_pred16_t p)2963 mve_pred16_t test_vcmpltq_m_s8(int8x16_t a, int8x16_t b, mve_pred16_t p)
2964 {
2965 #ifdef POLYMORPHIC
2966     return vcmpltq_m(a, b, p);
2967 #else /* POLYMORPHIC */
2968     return vcmpltq_m_s8(a, b, p);
2969 #endif /* POLYMORPHIC */
2970 }
2971 
2972 // CHECK-LABEL: @test_vcmpltq_m_s16(
2973 // CHECK-NEXT:  entry:
2974 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2975 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
2976 // CHECK-NEXT:    [[TMP2:%.*]] = icmp slt <8 x i16> [[A:%.*]], [[B:%.*]]
2977 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
2978 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
2979 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2980 // CHECK-NEXT:    ret i16 [[TMP5]]
2981 //
test_vcmpltq_m_s16(int16x8_t a,int16x8_t b,mve_pred16_t p)2982 mve_pred16_t test_vcmpltq_m_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)
2983 {
2984 #ifdef POLYMORPHIC
2985     return vcmpltq_m(a, b, p);
2986 #else /* POLYMORPHIC */
2987     return vcmpltq_m_s16(a, b, p);
2988 #endif /* POLYMORPHIC */
2989 }
2990 
2991 // CHECK-LABEL: @test_vcmpltq_m_s32(
2992 // CHECK-NEXT:  entry:
2993 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
2994 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
2995 // CHECK-NEXT:    [[TMP2:%.*]] = icmp slt <4 x i32> [[A:%.*]], [[B:%.*]]
2996 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
2997 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
2998 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
2999 // CHECK-NEXT:    ret i16 [[TMP5]]
3000 //
test_vcmpltq_m_s32(int32x4_t a,int32x4_t b,mve_pred16_t p)3001 mve_pred16_t test_vcmpltq_m_s32(int32x4_t a, int32x4_t b, mve_pred16_t p)
3002 {
3003 #ifdef POLYMORPHIC
3004     return vcmpltq_m(a, b, p);
3005 #else /* POLYMORPHIC */
3006     return vcmpltq_m_s32(a, b, p);
3007 #endif /* POLYMORPHIC */
3008 }
3009 
3010 // CHECK-LABEL: @test_vcmpltq_m_n_f16(
3011 // CHECK-NEXT:  entry:
3012 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
3013 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
3014 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> undef, half [[B:%.*]], i32 0
3015 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> undef, <8 x i32> zeroinitializer
3016 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp olt <8 x half> [[A:%.*]], [[DOTSPLAT]]
3017 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
3018 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
3019 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
3020 // CHECK-NEXT:    ret i16 [[TMP5]]
3021 //
test_vcmpltq_m_n_f16(float16x8_t a,float16_t b,mve_pred16_t p)3022 mve_pred16_t test_vcmpltq_m_n_f16(float16x8_t a, float16_t b, mve_pred16_t p)
3023 {
3024 #ifdef POLYMORPHIC
3025     return vcmpltq_m(a, b, p);
3026 #else /* POLYMORPHIC */
3027     return vcmpltq_m_n_f16(a, b, p);
3028 #endif /* POLYMORPHIC */
3029 }
3030 
3031 // CHECK-LABEL: @test_vcmpltq_m_n_f32(
3032 // CHECK-NEXT:  entry:
3033 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
3034 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
3035 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> undef, float [[B:%.*]], i32 0
3036 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> undef, <4 x i32> zeroinitializer
3037 // CHECK-NEXT:    [[TMP2:%.*]] = fcmp olt <4 x float> [[A:%.*]], [[DOTSPLAT]]
3038 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
3039 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
3040 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
3041 // CHECK-NEXT:    ret i16 [[TMP5]]
3042 //
test_vcmpltq_m_n_f32(float32x4_t a,float32_t b,mve_pred16_t p)3043 mve_pred16_t test_vcmpltq_m_n_f32(float32x4_t a, float32_t b, mve_pred16_t p)
3044 {
3045 #ifdef POLYMORPHIC
3046     return vcmpltq_m(a, b, p);
3047 #else /* POLYMORPHIC */
3048     return vcmpltq_m_n_f32(a, b, p);
3049 #endif /* POLYMORPHIC */
3050 }
3051 
3052 // CHECK-LABEL: @test_vcmpltq_m_n_s8(
3053 // CHECK-NEXT:  entry:
3054 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
3055 // CHECK-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])
3056 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> undef, i8 [[B:%.*]], i32 0
3057 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> undef, <16 x i32> zeroinitializer
3058 // CHECK-NEXT:    [[TMP2:%.*]] = icmp slt <16 x i8> [[A:%.*]], [[DOTSPLAT]]
3059 // CHECK-NEXT:    [[TMP3:%.*]] = and <16 x i1> [[TMP1]], [[TMP2]]
3060 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> [[TMP3]])
3061 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
3062 // CHECK-NEXT:    ret i16 [[TMP5]]
3063 //
test_vcmpltq_m_n_s8(int8x16_t a,int8_t b,mve_pred16_t p)3064 mve_pred16_t test_vcmpltq_m_n_s8(int8x16_t a, int8_t b, mve_pred16_t p)
3065 {
3066 #ifdef POLYMORPHIC
3067     return vcmpltq_m(a, b, p);
3068 #else /* POLYMORPHIC */
3069     return vcmpltq_m_n_s8(a, b, p);
3070 #endif /* POLYMORPHIC */
3071 }
3072 
3073 // CHECK-LABEL: @test_vcmpltq_m_n_s16(
3074 // CHECK-NEXT:  entry:
3075 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
3076 // CHECK-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
3077 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> undef, i16 [[B:%.*]], i32 0
3078 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> undef, <8 x i32> zeroinitializer
3079 // CHECK-NEXT:    [[TMP2:%.*]] = icmp slt <8 x i16> [[A:%.*]], [[DOTSPLAT]]
3080 // CHECK-NEXT:    [[TMP3:%.*]] = and <8 x i1> [[TMP1]], [[TMP2]]
3081 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> [[TMP3]])
3082 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
3083 // CHECK-NEXT:    ret i16 [[TMP5]]
3084 //
test_vcmpltq_m_n_s16(int16x8_t a,int16_t b,mve_pred16_t p)3085 mve_pred16_t test_vcmpltq_m_n_s16(int16x8_t a, int16_t b, mve_pred16_t p)
3086 {
3087 #ifdef POLYMORPHIC
3088     return vcmpltq_m(a, b, p);
3089 #else /* POLYMORPHIC */
3090     return vcmpltq_m_n_s16(a, b, p);
3091 #endif /* POLYMORPHIC */
3092 }
3093 
3094 // CHECK-LABEL: @test_vcmpltq_m_n_s32(
3095 // CHECK-NEXT:  entry:
3096 // CHECK-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
3097 // CHECK-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
3098 // CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> undef, i32 [[B:%.*]], i32 0
3099 // CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> undef, <4 x i32> zeroinitializer
3100 // CHECK-NEXT:    [[TMP2:%.*]] = icmp slt <4 x i32> [[A:%.*]], [[DOTSPLAT]]
3101 // CHECK-NEXT:    [[TMP3:%.*]] = and <4 x i1> [[TMP1]], [[TMP2]]
3102 // CHECK-NEXT:    [[TMP4:%.*]] = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> [[TMP3]])
3103 // CHECK-NEXT:    [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
3104 // CHECK-NEXT:    ret i16 [[TMP5]]
3105 //
test_vcmpltq_m_n_s32(int32x4_t a,int32_t b,mve_pred16_t p)3106 mve_pred16_t test_vcmpltq_m_n_s32(int32x4_t a, int32_t b, mve_pred16_t p)
3107 {
3108 #ifdef POLYMORPHIC
3109     return vcmpltq_m(a, b, p);
3110 #else /* POLYMORPHIC */
3111     return vcmpltq_m_n_s32(a, b, p);
3112 #endif /* POLYMORPHIC */
3113 }
3114 
3115