1 ; RUN: llc < %s -mtriple=armv8-linux-gnueabihf -mattr=+fp-armv8 -float-abi=hard | FileCheck %s
2 @varfloat = global float 0.0
3 @vardouble = global double 0.0
4 define void @test_vsel32sgt(i32 %lhs32, i32 %rhs32, float %a, float %b) {
5 ; CHECK-LABEL: test_vsel32sgt
6 %tst1 = icmp sgt i32 %lhs32, %rhs32
7 %val1 = select i1 %tst1, float %a, float %b
8 store float %val1, float* @varfloat
10 ; CHECK: vselgt.f32 s0, s0, s1
13 define void @test_vsel64sgt(i32 %lhs32, i32 %rhs32, double %a, double %b) {
14 ; CHECK-LABEL: test_vsel64sgt
15 %tst1 = icmp sgt i32 %lhs32, %rhs32
16 %val1 = select i1 %tst1, double %a, double %b
17 store double %val1, double* @vardouble
19 ; CHECK: vselgt.f64 d16, d0, d1
22 define void @test_vsel32sge(i32 %lhs32, i32 %rhs32, float %a, float %b) {
23 ; CHECK-LABEL: test_vsel32sge
24 %tst1 = icmp sge i32 %lhs32, %rhs32
25 %val1 = select i1 %tst1, float %a, float %b
26 store float %val1, float* @varfloat
28 ; CHECK: vselge.f32 s0, s0, s1
31 define void @test_vsel64sge(i32 %lhs32, i32 %rhs32, double %a, double %b) {
32 ; CHECK-LABEL: test_vsel64sge
33 %tst1 = icmp sge i32 %lhs32, %rhs32
34 %val1 = select i1 %tst1, double %a, double %b
35 store double %val1, double* @vardouble
37 ; CHECK: vselge.f64 d16, d0, d1
40 define void @test_vsel32eq(i32 %lhs32, i32 %rhs32, float %a, float %b) {
41 ; CHECK-LABEL: test_vsel32eq
42 %tst1 = icmp eq i32 %lhs32, %rhs32
43 %val1 = select i1 %tst1, float %a, float %b
44 store float %val1, float* @varfloat
46 ; CHECK: vseleq.f32 s0, s0, s1
49 define void @test_vsel64eq(i32 %lhs32, i32 %rhs32, double %a, double %b) {
50 ; CHECK-LABEL: test_vsel64eq
51 %tst1 = icmp eq i32 %lhs32, %rhs32
52 %val1 = select i1 %tst1, double %a, double %b
53 store double %val1, double* @vardouble
55 ; CHECK: vseleq.f64 d16, d0, d1
58 define void @test_vsel32slt(i32 %lhs32, i32 %rhs32, float %a, float %b) {
59 ; CHECK-LABEL: test_vsel32slt
60 %tst1 = icmp slt i32 %lhs32, %rhs32
61 %val1 = select i1 %tst1, float %a, float %b
62 store float %val1, float* @varfloat
64 ; CHECK: vselge.f32 s0, s1, s0
67 define void @test_vsel64slt(i32 %lhs32, i32 %rhs32, double %a, double %b) {
68 ; CHECK-LABEL: test_vsel64slt
69 %tst1 = icmp slt i32 %lhs32, %rhs32
70 %val1 = select i1 %tst1, double %a, double %b
71 store double %val1, double* @vardouble
73 ; CHECK: vselge.f64 d16, d1, d0
76 define void @test_vsel32sle(i32 %lhs32, i32 %rhs32, float %a, float %b) {
77 ; CHECK-LABEL: test_vsel32sle
78 %tst1 = icmp sle i32 %lhs32, %rhs32
79 %val1 = select i1 %tst1, float %a, float %b
80 store float %val1, float* @varfloat
82 ; CHECK: vselgt.f32 s0, s1, s0
85 define void @test_vsel64sle(i32 %lhs32, i32 %rhs32, double %a, double %b) {
86 ; CHECK-LABEL: test_vsel64sle
87 %tst1 = icmp sle i32 %lhs32, %rhs32
88 %val1 = select i1 %tst1, double %a, double %b
89 store double %val1, double* @vardouble
91 ; CHECK: vselgt.f64 d16, d1, d0
94 define void @test_vsel32ogt(float %lhs32, float %rhs32, float %a, float %b) {
95 ; CHECK-LABEL: test_vsel32ogt
96 %tst1 = fcmp ogt float %lhs32, %rhs32
97 %val1 = select i1 %tst1, float %a, float %b
98 store float %val1, float* @varfloat
99 ; CHECK: vcmp.f32 s0, s1
100 ; CHECK: vselgt.f32 s0, s2, s3
103 define void @test_vsel64ogt(float %lhs32, float %rhs32, double %a, double %b) {
104 ; CHECK-LABEL: test_vsel64ogt
105 %tst1 = fcmp ogt float %lhs32, %rhs32
106 %val1 = select i1 %tst1, double %a, double %b
107 store double %val1, double* @vardouble
108 ; CHECK: vcmp.f32 s0, s1
109 ; CHECK: vselgt.f64 d16, d1, d2
112 define void @test_vsel32oge(float %lhs32, float %rhs32, float %a, float %b) {
113 ; CHECK-LABEL: test_vsel32oge
114 %tst1 = fcmp oge float %lhs32, %rhs32
115 %val1 = select i1 %tst1, float %a, float %b
116 store float %val1, float* @varfloat
117 ; CHECK: vcmp.f32 s0, s1
118 ; CHECK: vselge.f32 s0, s2, s3
121 define void @test_vsel64oge(float %lhs32, float %rhs32, double %a, double %b) {
122 ; CHECK-LABEL: test_vsel64oge
123 %tst1 = fcmp oge float %lhs32, %rhs32
124 %val1 = select i1 %tst1, double %a, double %b
125 store double %val1, double* @vardouble
126 ; CHECK: vcmp.f32 s0, s1
127 ; CHECK: vselge.f64 d16, d1, d2
130 define void @test_vsel32oeq(float %lhs32, float %rhs32, float %a, float %b) {
131 ; CHECK-LABEL: test_vsel32oeq
132 %tst1 = fcmp oeq float %lhs32, %rhs32
133 %val1 = select i1 %tst1, float %a, float %b
134 store float %val1, float* @varfloat
135 ; CHECK: vcmp.f32 s0, s1
136 ; CHECK: vseleq.f32 s0, s2, s3
139 define void @test_vsel64oeq(float %lhs32, float %rhs32, double %a, double %b) {
140 ; CHECK-LABEL: test_vsel64oeq
141 %tst1 = fcmp oeq float %lhs32, %rhs32
142 %val1 = select i1 %tst1, double %a, double %b
143 store double %val1, double* @vardouble
144 ; CHECK: vcmp.f32 s0, s1
145 ; CHECK: vseleq.f64 d16, d1, d2
148 define void @test_vsel32ugt(float %lhs32, float %rhs32, float %a, float %b) {
149 ; CHECK-LABEL: test_vsel32ugt
150 %tst1 = fcmp ugt float %lhs32, %rhs32
151 %val1 = select i1 %tst1, float %a, float %b
152 store float %val1, float* @varfloat
153 ; CHECK: vcmp.f32 s1, s0
154 ; CHECK: vselge.f32 s0, s3, s2
157 define void @test_vsel64ugt(float %lhs32, float %rhs32, double %a, double %b) {
158 ; CHECK-LABEL: test_vsel64ugt
159 %tst1 = fcmp ugt float %lhs32, %rhs32
160 %val1 = select i1 %tst1, double %a, double %b
161 store double %val1, double* @vardouble
162 ; CHECK: vcmp.f32 s1, s0
163 ; CHECK: vselge.f64 d16, d2, d1
166 define void @test_vsel32uge(float %lhs32, float %rhs32, float %a, float %b) {
167 ; CHECK-LABEL: test_vsel32uge
168 %tst1 = fcmp uge float %lhs32, %rhs32
169 %val1 = select i1 %tst1, float %a, float %b
170 store float %val1, float* @varfloat
171 ; CHECK: vcmp.f32 s1, s0
172 ; CHECK: vselgt.f32 s0, s3, s2
175 define void @test_vsel64uge(float %lhs32, float %rhs32, double %a, double %b) {
176 ; CHECK-LABEL: test_vsel64uge
177 %tst1 = fcmp uge float %lhs32, %rhs32
178 %val1 = select i1 %tst1, double %a, double %b
179 store double %val1, double* @vardouble
180 ; CHECK: vcmp.f32 s1, s0
181 ; CHECK: vselgt.f64 d16, d2, d1
184 define void @test_vsel32olt(float %lhs32, float %rhs32, float %a, float %b) {
185 ; CHECK-LABEL: test_vsel32olt
186 %tst1 = fcmp olt float %lhs32, %rhs32
187 %val1 = select i1 %tst1, float %a, float %b
188 store float %val1, float* @varfloat
189 ; CHECK: vcmp.f32 s1, s0
190 ; CHECK: vselgt.f32 s0, s2, s3
193 define void @test_vsel64olt(float %lhs32, float %rhs32, double %a, double %b) {
194 ; CHECK-LABEL: test_vsel64olt
195 %tst1 = fcmp olt float %lhs32, %rhs32
196 %val1 = select i1 %tst1, double %a, double %b
197 store double %val1, double* @vardouble
198 ; CHECK: vcmp.f32 s1, s0
199 ; CHECK: vselgt.f64 d16, d1, d2
202 define void @test_vsel32ult(float %lhs32, float %rhs32, float %a, float %b) {
203 ; CHECK-LABEL: test_vsel32ult
204 %tst1 = fcmp ult float %lhs32, %rhs32
205 %val1 = select i1 %tst1, float %a, float %b
206 store float %val1, float* @varfloat
207 ; CHECK: vcmp.f32 s0, s1
208 ; CHECK: vselge.f32 s0, s3, s2
211 define void @test_vsel64ult(float %lhs32, float %rhs32, double %a, double %b) {
212 ; CHECK-LABEL: test_vsel64ult
213 %tst1 = fcmp ult float %lhs32, %rhs32
214 %val1 = select i1 %tst1, double %a, double %b
215 store double %val1, double* @vardouble
216 ; CHECK: vcmp.f32 s0, s1
217 ; CHECK: vselge.f64 d16, d2, d1
220 define void @test_vsel32ole(float %lhs32, float %rhs32, float %a, float %b) {
221 ; CHECK-LABEL: test_vsel32ole
222 %tst1 = fcmp ole float %lhs32, %rhs32
223 %val1 = select i1 %tst1, float %a, float %b
224 store float %val1, float* @varfloat
225 ; CHECK: vcmp.f32 s1, s0
226 ; CHECK: vselge.f32 s0, s2, s3
229 define void @test_vsel64ole(float %lhs32, float %rhs32, double %a, double %b) {
230 ; CHECK-LABEL: test_vsel64ole
231 %tst1 = fcmp ole float %lhs32, %rhs32
232 %val1 = select i1 %tst1, double %a, double %b
233 store double %val1, double* @vardouble
234 ; CHECK: vcmp.f32 s1, s0
235 ; CHECK: vselge.f64 d16, d1, d2
238 define void @test_vsel32ule(float %lhs32, float %rhs32, float %a, float %b) {
239 ; CHECK-LABEL: test_vsel32ule
240 %tst1 = fcmp ule float %lhs32, %rhs32
241 %val1 = select i1 %tst1, float %a, float %b
242 store float %val1, float* @varfloat
243 ; CHECK: vcmp.f32 s0, s1
244 ; CHECK: vselgt.f32 s0, s3, s2
247 define void @test_vsel64ule(float %lhs32, float %rhs32, double %a, double %b) {
248 ; CHECK-LABEL: test_vsel64ule
249 %tst1 = fcmp ule float %lhs32, %rhs32
250 %val1 = select i1 %tst1, double %a, double %b
251 store double %val1, double* @vardouble
252 ; CHECK: vcmp.f32 s0, s1
253 ; CHECK: vselgt.f64 d16, d2, d1
256 define void @test_vsel32ord(float %lhs32, float %rhs32, float %a, float %b) {
257 ; CHECK-LABEL: test_vsel32ord
258 %tst1 = fcmp ord float %lhs32, %rhs32
259 %val1 = select i1 %tst1, float %a, float %b
260 store float %val1, float* @varfloat
261 ; CHECK: vcmp.f32 s0, s1
262 ; CHECK: vselvs.f32 s0, s3, s2
265 define void @test_vsel64ord(float %lhs32, float %rhs32, double %a, double %b) {
266 ; CHECK-LABEL: test_vsel64ord
267 %tst1 = fcmp ord float %lhs32, %rhs32
268 %val1 = select i1 %tst1, double %a, double %b
269 store double %val1, double* @vardouble
270 ; CHECK: vcmp.f32 s0, s1
271 ; CHECK: vselvs.f64 d16, d2, d1
274 define void @test_vsel32une(float %lhs32, float %rhs32, float %a, float %b) {
275 ; CHECK-LABEL: test_vsel32une
276 %tst1 = fcmp une float %lhs32, %rhs32
277 %val1 = select i1 %tst1, float %a, float %b
278 store float %val1, float* @varfloat
279 ; CHECK: vcmp.f32 s0, s1
280 ; CHECK: vseleq.f32 s0, s3, s2
283 define void @test_vsel64une(float %lhs32, float %rhs32, double %a, double %b) {
284 ; CHECK-LABEL: test_vsel64une
285 %tst1 = fcmp une float %lhs32, %rhs32
286 %val1 = select i1 %tst1, double %a, double %b
287 store double %val1, double* @vardouble
288 ; CHECK: vcmp.f32 s0, s1
289 ; CHECK: vseleq.f64 d16, d2, d1
292 define void @test_vsel32uno(float %lhs32, float %rhs32, float %a, float %b) {
293 ; CHECK-LABEL: test_vsel32uno
294 %tst1 = fcmp uno float %lhs32, %rhs32
295 %val1 = select i1 %tst1, float %a, float %b
296 store float %val1, float* @varfloat
297 ; CHECK: vcmp.f32 s0, s1
298 ; CHECK: vselvs.f32 s0, s2, s3
301 define void @test_vsel64uno(float %lhs32, float %rhs32, double %a, double %b) {
302 ; CHECK-LABEL: test_vsel64uno
303 %tst1 = fcmp uno float %lhs32, %rhs32
304 %val1 = select i1 %tst1, double %a, double %b
305 store double %val1, double* @vardouble
306 ; CHECK: vcmp.f32 s0, s1
307 ; CHECK: vselvs.f64 d16, d1, d2
311 define void @test_vsel32ogt_nnan(float %lhs32, float %rhs32, float %a, float %b) {
312 ; CHECK-LABEL: test_vsel32ogt_nnan
313 %tst1 = fcmp nnan ogt float %lhs32, %rhs32
314 %val1 = select i1 %tst1, float %a, float %b
315 store float %val1, float* @varfloat
316 ; CHECK: vcmp.f32 s0, s1
317 ; CHECK: vselgt.f32 s0, s2, s3
320 define void @test_vsel64ogt_nnan(float %lhs32, float %rhs32, double %a, double %b) {
321 ; CHECK-LABEL: test_vsel64ogt_nnan
322 %tst1 = fcmp nnan ogt float %lhs32, %rhs32
323 %val1 = select i1 %tst1, double %a, double %b
324 store double %val1, double* @vardouble
325 ; CHECK: vcmp.f32 s0, s1
326 ; CHECK: vselgt.f64 d16, d1, d2
329 define void @test_vsel32oge_nnan(float %lhs32, float %rhs32, float %a, float %b) {
330 ; CHECK-LABEL: test_vsel32oge_nnan
331 %tst1 = fcmp nnan oge float %lhs32, %rhs32
332 %val1 = select i1 %tst1, float %a, float %b
333 store float %val1, float* @varfloat
334 ; CHECK: vcmp.f32 s0, s1
335 ; CHECK: vselge.f32 s0, s2, s3
338 define void @test_vsel64oge_nnan(float %lhs32, float %rhs32, double %a, double %b) {
339 ; CHECK-LABEL: test_vsel64oge_nnan
340 %tst1 = fcmp nnan oge float %lhs32, %rhs32
341 %val1 = select i1 %tst1, double %a, double %b
342 store double %val1, double* @vardouble
343 ; CHECK: vcmp.f32 s0, s1
344 ; CHECK: vselge.f64 d16, d1, d2
347 define void @test_vsel32oeq_nnan(float %lhs32, float %rhs32, float %a, float %b) {
348 ; CHECK-LABEL: test_vsel32oeq_nnan
349 %tst1 = fcmp nnan oeq float %lhs32, %rhs32
350 %val1 = select i1 %tst1, float %a, float %b
351 store float %val1, float* @varfloat
352 ; CHECK: vcmp.f32 s0, s1
353 ; CHECK: vseleq.f32 s0, s2, s3
356 define void @test_vsel64oeq_nnan(float %lhs32, float %rhs32, double %a, double %b) {
357 ; CHECK-LABEL: test_vsel64oeq_nnan
358 %tst1 = fcmp nnan oeq float %lhs32, %rhs32
359 %val1 = select i1 %tst1, double %a, double %b
360 store double %val1, double* @vardouble
361 ; CHECK: vcmp.f32 s0, s1
362 ; CHECK: vseleq.f64 d16, d1, d2
365 define void @test_vsel32ugt_nnan(float %lhs32, float %rhs32, float %a, float %b) {
366 ; CHECK-LABEL: test_vsel32ugt_nnan
367 %tst1 = fcmp nnan ugt float %lhs32, %rhs32
368 %val1 = select i1 %tst1, float %a, float %b
369 store float %val1, float* @varfloat
370 ; CHECK: vcmp.f32 s0, s1
371 ; CHECK: vselgt.f32 s0, s2, s3
374 define void @test_vsel64ugt_nnan(float %lhs32, float %rhs32, double %a, double %b) {
375 ; CHECK-LABEL: test_vsel64ugt_nnan
376 %tst1 = fcmp nnan ugt float %lhs32, %rhs32
377 %val1 = select i1 %tst1, double %a, double %b
378 store double %val1, double* @vardouble
379 ; CHECK: vcmp.f32 s0, s1
380 ; CHECK: vselgt.f64 d16, d1, d2
383 define void @test_vsel32uge_nnan(float %lhs32, float %rhs32, float %a, float %b) {
384 ; CHECK-LABEL: test_vsel32uge_nnan
385 %tst1 = fcmp nnan uge float %lhs32, %rhs32
386 %val1 = select i1 %tst1, float %a, float %b
387 store float %val1, float* @varfloat
388 ; CHECK: vcmp.f32 s0, s1
389 ; CHECK: vselge.f32 s0, s2, s3
392 define void @test_vsel64uge_nnan(float %lhs32, float %rhs32, double %a, double %b) {
393 ; CHECK-LABEL: test_vsel64uge_nnan
394 %tst1 = fcmp nnan uge float %lhs32, %rhs32
395 %val1 = select i1 %tst1, double %a, double %b
396 store double %val1, double* @vardouble
397 ; CHECK: vcmp.f32 s0, s1
398 ; CHECK: vselge.f64 d16, d1, d2
401 define void @test_vsel32olt_nnan(float %lhs32, float %rhs32, float %a, float %b) {
402 ; CHECK-LABEL: test_vsel32olt_nnan
403 %tst1 = fcmp nnan olt float %lhs32, %rhs32
404 %val1 = select i1 %tst1, float %a, float %b
405 store float %val1, float* @varfloat
406 ; CHECK: vcmp.f32 s1, s0
407 ; CHECK: vselgt.f32 s0, s2, s3
410 define void @test_vsel64olt_nnan(float %lhs32, float %rhs32, double %a, double %b) {
411 ; CHECK-LABEL: test_vsel64olt_nnan
412 %tst1 = fcmp nnan olt float %lhs32, %rhs32
413 %val1 = select i1 %tst1, double %a, double %b
414 store double %val1, double* @vardouble
415 ; CHECK: vcmp.f32 s1, s0
416 ; CHECK: vselgt.f64 d16, d1, d2
419 define void @test_vsel32ult_nnan(float %lhs32, float %rhs32, float %a, float %b) {
420 ; CHECK-LABEL: test_vsel32ult_nnan
421 %tst1 = fcmp nnan ult float %lhs32, %rhs32
422 %val1 = select i1 %tst1, float %a, float %b
423 store float %val1, float* @varfloat
424 ; CHECK: vcmp.f32 s1, s0
425 ; CHECK: vselgt.f32 s0, s2, s3
428 define void @test_vsel64ult_nnan(float %lhs32, float %rhs32, double %a, double %b) {
429 ; CHECK-LABEL: test_vsel64ult_nnan
430 %tst1 = fcmp nnan ult float %lhs32, %rhs32
431 %val1 = select i1 %tst1, double %a, double %b
432 store double %val1, double* @vardouble
433 ; CHECK: vcmp.f32 s1, s0
434 ; CHECK: vselgt.f64 d16, d1, d2
437 define void @test_vsel32ole_nnan(float %lhs32, float %rhs32, float %a, float %b) {
438 ; CHECK-LABEL: test_vsel32ole_nnan
439 %tst1 = fcmp nnan ole float %lhs32, %rhs32
440 %val1 = select i1 %tst1, float %a, float %b
441 store float %val1, float* @varfloat
442 ; CHECK: vcmp.f32 s1, s0
443 ; CHECK: vselge.f32 s0, s2, s3
446 define void @test_vsel64ole_nnan(float %lhs32, float %rhs32, double %a, double %b) {
447 ; CHECK-LABEL: test_vsel64ole_nnan
448 %tst1 = fcmp nnan ole float %lhs32, %rhs32
449 %val1 = select i1 %tst1, double %a, double %b
450 store double %val1, double* @vardouble
451 ; CHECK: vcmp.f32 s1, s0
452 ; CHECK: vselge.f64 d16, d1, d2
455 define void @test_vsel32ule_nnan(float %lhs32, float %rhs32, float %a, float %b) {
456 ; CHECK-LABEL: test_vsel32ule_nnan
457 %tst1 = fcmp nnan ule float %lhs32, %rhs32
458 %val1 = select i1 %tst1, float %a, float %b
459 store float %val1, float* @varfloat
460 ; CHECK: vcmp.f32 s1, s0
461 ; CHECK: vselge.f32 s0, s2, s3
464 define void @test_vsel64ule_nnan(float %lhs32, float %rhs32, double %a, double %b) {
465 ; CHECK-LABEL: test_vsel64ule_nnan
466 %tst1 = fcmp nnan ule float %lhs32, %rhs32
467 %val1 = select i1 %tst1, double %a, double %b
468 store double %val1, double* @vardouble
469 ; CHECK: vcmp.f32 s1, s0
470 ; CHECK: vselge.f64 d16, d1, d2
473 define void @test_vsel32ord_nnan(float %lhs32, float %rhs32, float %a, float %b) {
474 ; CHECK-LABEL: test_vsel32ord_nnan
475 %tst1 = fcmp nnan ord float %lhs32, %rhs32
476 %val1 = select i1 %tst1, float %a, float %b
477 store float %val1, float* @varfloat
478 ; CHECK: vcmp.f32 s0, s1
479 ; CHECK: vselvs.f32 s0, s3, s2
482 define void @test_vsel64ord_nnan(float %lhs32, float %rhs32, double %a, double %b) {
483 ; CHECK-LABEL: test_vsel64ord_nnan
484 %tst1 = fcmp nnan ord float %lhs32, %rhs32
485 %val1 = select i1 %tst1, double %a, double %b
486 store double %val1, double* @vardouble
487 ; CHECK: vcmp.f32 s0, s1
488 ; CHECK: vselvs.f64 d16, d2, d1
491 define void @test_vsel32une_nnan(float %lhs32, float %rhs32, float %a, float %b) {
492 ; CHECK-LABEL: test_vsel32une_nnan
493 %tst1 = fcmp nnan une float %lhs32, %rhs32
494 %val1 = select i1 %tst1, float %a, float %b
495 store float %val1, float* @varfloat
496 ; CHECK: vcmp.f32 s0, s1
497 ; CHECK: vseleq.f32 s0, s3, s2
500 define void @test_vsel64une_nnan(float %lhs32, float %rhs32, double %a, double %b) {
501 ; CHECK-LABEL: test_vsel64une_nnan
502 %tst1 = fcmp nnan une float %lhs32, %rhs32
503 %val1 = select i1 %tst1, double %a, double %b
504 store double %val1, double* @vardouble
505 ; CHECK: vcmp.f32 s0, s1
506 ; CHECK: vseleq.f64 d16, d2, d1
509 define void @test_vsel32uno_nnan(float %lhs32, float %rhs32, float %a, float %b) {
510 ; CHECK-LABEL: test_vsel32uno_nnan
511 %tst1 = fcmp nnan uno float %lhs32, %rhs32
512 %val1 = select i1 %tst1, float %a, float %b
513 store float %val1, float* @varfloat
514 ; CHECK: vcmp.f32 s0, s1
515 ; CHECK: vselvs.f32 s0, s2, s3
518 define void @test_vsel64uno_nnan(float %lhs32, float %rhs32, double %a, double %b) {
519 ; CHECK-LABEL: test_vsel64uno_nnan
520 %tst1 = fcmp nnan uno float %lhs32, %rhs32
521 %val1 = select i1 %tst1, double %a, double %b
522 store double %val1, double* @vardouble
523 ; CHECK: vcmp.f32 s0, s1
524 ; CHECK: vselvs.f64 d16, d1, d2
528 define void @test_vsel_ltzero(i32 %lhs32, float %a, float %b) {
529 ; CHECK-LABEL: test_vsel_ltzero
530 %tst1 = icmp slt i32 %lhs32, 0
531 %val1 = select i1 %tst1, float %a, float %b
532 store float %val1, float* @varfloat
534 ; CHECK: vselge.f32 s0, s1, s0
538 define void @test_vsel_lezero(i32 %lhs32, float %a, float %b) {
539 ; CHECK-LABEL: test_vsel_lezero
540 %tst1 = icmp sle i32 %lhs32, 0
541 %val1 = select i1 %tst1, float %a, float %b
542 store float %val1, float* @varfloat
544 ; CHECK: vselge.f32 s0, s1, s0
548 define void @test_vsel_gtzero(i32 %lhs32, float %a, float %b) {
549 ; CHECK-LABEL: test_vsel_gtzero
550 %tst1 = icmp sgt i32 %lhs32, 0
551 %val1 = select i1 %tst1, float %a, float %b
552 store float %val1, float* @varfloat
554 ; CHECK: vselgt.f32 s0, s0, s1
558 define void @test_vsel_gezero(i32 %lhs32, float %a, float %b) {
559 ; CHECK-LABEL: test_vsel_gezero
560 %tst1 = icmp sge i32 %lhs32, 0
561 %val1 = select i1 %tst1, float %a, float %b
562 store float %val1, float* @varfloat
564 ; CHECK: vselgt.f32 s0, s0, s1
568 define void @test_vsel_ltzero64(i32 %lhs32, double %a, double %b) {
569 ; CHECK-LABEL: test_vsel_ltzero
570 %tst1 = icmp slt i32 %lhs32, 0
571 %val1 = select i1 %tst1, double %a, double %b
572 store double %val1, double* @vardouble
574 ; CHECK: vselge.f64 d16, d1, d0
578 define void @test_vsel_lezero64(i32 %lhs32, double %a, double %b) {
579 ; CHECK-LABEL: test_vsel_lezero
580 %tst1 = icmp sle i32 %lhs32, 0
581 %val1 = select i1 %tst1, double %a, double %b
582 store double %val1, double* @vardouble
584 ; CHECK: vselge.f64 d16, d1, d0
588 define void @test_vsel_gtzero64(i32 %lhs32, double %a, double %b) {
589 ; CHECK-LABEL: test_vsel_gtzero
590 %tst1 = icmp sgt i32 %lhs32, 0
591 %val1 = select i1 %tst1, double %a, double %b
592 store double %val1, double* @vardouble
594 ; CHECK: vselgt.f64 d16, d0, d1
598 define void @test_vsel_gezero64(i32 %lhs32, double %a, double %b) {
599 ; CHECK-LABEL: test_vsel_gezero
600 %tst1 = icmp sge i32 %lhs32, 0
601 %val1 = select i1 %tst1, double %a, double %b
602 store double %val1, double* @vardouble
604 ; CHECK: vselgt.f64 d16, d0, d1