xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/vsel.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=armv8-linux-gnueabihf -mattr=+fp-armv8 -float-abi=hard | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker@varfloat = global float 0.0
3*9880d681SAndroid Build Coastguard Worker@vardouble = global double 0.0
4*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32sgt(i32 %lhs32, i32 %rhs32, float %a, float %b) {
5*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32sgt
6*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp sgt i32 %lhs32, %rhs32
7*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
8*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
9*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
10*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f32 s0, s0, s1
11*9880d681SAndroid Build Coastguard Worker  ret void
12*9880d681SAndroid Build Coastguard Worker}
13*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64sgt(i32 %lhs32, i32 %rhs32, double %a, double %b) {
14*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64sgt
15*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp sgt i32 %lhs32, %rhs32
16*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
17*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
18*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
19*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f64 d16, d0, d1
20*9880d681SAndroid Build Coastguard Worker  ret void
21*9880d681SAndroid Build Coastguard Worker}
22*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32sge(i32 %lhs32, i32 %rhs32, float %a, float %b) {
23*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32sge
24*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp sge i32 %lhs32, %rhs32
25*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
26*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
27*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
28*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f32 s0, s0, s1
29*9880d681SAndroid Build Coastguard Worker  ret void
30*9880d681SAndroid Build Coastguard Worker}
31*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64sge(i32 %lhs32, i32 %rhs32, double %a, double %b) {
32*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64sge
33*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp sge i32 %lhs32, %rhs32
34*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
35*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
36*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
37*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f64 d16, d0, d1
38*9880d681SAndroid Build Coastguard Worker  ret void
39*9880d681SAndroid Build Coastguard Worker}
40*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32eq(i32 %lhs32, i32 %rhs32, float %a, float %b) {
41*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32eq
42*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp eq i32 %lhs32, %rhs32
43*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
44*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
45*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
46*9880d681SAndroid Build Coastguard Worker; CHECK: vseleq.f32 s0, s0, s1
47*9880d681SAndroid Build Coastguard Worker  ret void
48*9880d681SAndroid Build Coastguard Worker}
49*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64eq(i32 %lhs32, i32 %rhs32, double %a, double %b) {
50*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64eq
51*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp eq i32 %lhs32, %rhs32
52*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
53*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
54*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
55*9880d681SAndroid Build Coastguard Worker; CHECK: vseleq.f64 d16, d0, d1
56*9880d681SAndroid Build Coastguard Worker  ret void
57*9880d681SAndroid Build Coastguard Worker}
58*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32slt(i32 %lhs32, i32 %rhs32, float %a, float %b) {
59*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32slt
60*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp slt i32 %lhs32, %rhs32
61*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
62*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
63*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
64*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f32 s0, s1, s0
65*9880d681SAndroid Build Coastguard Worker  ret void
66*9880d681SAndroid Build Coastguard Worker}
67*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64slt(i32 %lhs32, i32 %rhs32, double %a, double %b) {
68*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64slt
69*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp slt i32 %lhs32, %rhs32
70*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
71*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
72*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
73*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f64 d16, d1, d0
74*9880d681SAndroid Build Coastguard Worker  ret void
75*9880d681SAndroid Build Coastguard Worker}
76*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32sle(i32 %lhs32, i32 %rhs32, float %a, float %b) {
77*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32sle
78*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp sle i32 %lhs32, %rhs32
79*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
80*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
81*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
82*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f32 s0, s1, s0
83*9880d681SAndroid Build Coastguard Worker  ret void
84*9880d681SAndroid Build Coastguard Worker}
85*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64sle(i32 %lhs32, i32 %rhs32, double %a, double %b) {
86*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64sle
87*9880d681SAndroid Build Coastguard Worker  %tst1 = icmp sle i32 %lhs32, %rhs32
88*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
89*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
90*9880d681SAndroid Build Coastguard Worker; CHECK: cmp r0, r1
91*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f64 d16, d1, d0
92*9880d681SAndroid Build Coastguard Worker  ret void
93*9880d681SAndroid Build Coastguard Worker}
94*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32ogt(float %lhs32, float %rhs32, float %a, float %b) {
95*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32ogt
96*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ogt float %lhs32, %rhs32
97*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
98*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
99*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
100*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f32 s0, s2, s3
101*9880d681SAndroid Build Coastguard Worker  ret void
102*9880d681SAndroid Build Coastguard Worker}
103*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64ogt(float %lhs32, float %rhs32, double %a, double %b) {
104*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64ogt
105*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ogt float %lhs32, %rhs32
106*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
107*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
108*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
109*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f64 d16, d1, d2
110*9880d681SAndroid Build Coastguard Worker  ret void
111*9880d681SAndroid Build Coastguard Worker}
112*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32oge(float %lhs32, float %rhs32, float %a, float %b) {
113*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32oge
114*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp oge float %lhs32, %rhs32
115*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
116*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
117*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
118*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f32 s0, s2, s3
119*9880d681SAndroid Build Coastguard Worker  ret void
120*9880d681SAndroid Build Coastguard Worker}
121*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64oge(float %lhs32, float %rhs32, double %a, double %b) {
122*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64oge
123*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp oge float %lhs32, %rhs32
124*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
125*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
126*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
127*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f64 d16, d1, d2
128*9880d681SAndroid Build Coastguard Worker  ret void
129*9880d681SAndroid Build Coastguard Worker}
130*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32oeq(float %lhs32, float %rhs32, float %a, float %b) {
131*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32oeq
132*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp oeq float %lhs32, %rhs32
133*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
134*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
135*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
136*9880d681SAndroid Build Coastguard Worker; CHECK: vseleq.f32 s0, s2, s3
137*9880d681SAndroid Build Coastguard Worker  ret void
138*9880d681SAndroid Build Coastguard Worker}
139*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64oeq(float %lhs32, float %rhs32, double %a, double %b) {
140*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64oeq
141*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp oeq float %lhs32, %rhs32
142*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
143*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
144*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
145*9880d681SAndroid Build Coastguard Worker; CHECK: vseleq.f64 d16, d1, d2
146*9880d681SAndroid Build Coastguard Worker  ret void
147*9880d681SAndroid Build Coastguard Worker}
148*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32ugt(float %lhs32, float %rhs32, float %a, float %b) {
149*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32ugt
150*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ugt float %lhs32, %rhs32
151*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
152*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
153*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s1, s0
154*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f32 s0, s3, s2
155*9880d681SAndroid Build Coastguard Worker  ret void
156*9880d681SAndroid Build Coastguard Worker}
157*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64ugt(float %lhs32, float %rhs32, double %a, double %b) {
158*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64ugt
159*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ugt float %lhs32, %rhs32
160*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
161*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
162*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s1, s0
163*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f64 d16, d2, d1
164*9880d681SAndroid Build Coastguard Worker  ret void
165*9880d681SAndroid Build Coastguard Worker}
166*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32uge(float %lhs32, float %rhs32, float %a, float %b) {
167*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32uge
168*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp uge float %lhs32, %rhs32
169*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
170*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
171*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s1, s0
172*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f32 s0, s3, s2
173*9880d681SAndroid Build Coastguard Worker  ret void
174*9880d681SAndroid Build Coastguard Worker}
175*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64uge(float %lhs32, float %rhs32, double %a, double %b) {
176*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64uge
177*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp uge float %lhs32, %rhs32
178*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
179*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
180*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s1, s0
181*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f64 d16, d2, d1
182*9880d681SAndroid Build Coastguard Worker  ret void
183*9880d681SAndroid Build Coastguard Worker}
184*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32olt(float %lhs32, float %rhs32, float %a, float %b) {
185*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32olt
186*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp olt float %lhs32, %rhs32
187*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
188*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
189*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s1, s0
190*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f32 s0, s2, s3
191*9880d681SAndroid Build Coastguard Worker  ret void
192*9880d681SAndroid Build Coastguard Worker}
193*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64olt(float %lhs32, float %rhs32, double %a, double %b) {
194*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64olt
195*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp olt float %lhs32, %rhs32
196*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
197*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
198*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s1, s0
199*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f64 d16, d1, d2
200*9880d681SAndroid Build Coastguard Worker  ret void
201*9880d681SAndroid Build Coastguard Worker}
202*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32ult(float %lhs32, float %rhs32, float %a, float %b) {
203*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32ult
204*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ult float %lhs32, %rhs32
205*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
206*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
207*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
208*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f32 s0, s3, s2
209*9880d681SAndroid Build Coastguard Worker  ret void
210*9880d681SAndroid Build Coastguard Worker}
211*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64ult(float %lhs32, float %rhs32, double %a, double %b) {
212*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64ult
213*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ult float %lhs32, %rhs32
214*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
215*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
216*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
217*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f64 d16, d2, d1
218*9880d681SAndroid Build Coastguard Worker  ret void
219*9880d681SAndroid Build Coastguard Worker}
220*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32ole(float %lhs32, float %rhs32, float %a, float %b) {
221*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32ole
222*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ole float %lhs32, %rhs32
223*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
224*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
225*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s1, s0
226*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f32 s0, s2, s3
227*9880d681SAndroid Build Coastguard Worker  ret void
228*9880d681SAndroid Build Coastguard Worker}
229*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64ole(float %lhs32, float %rhs32, double %a, double %b) {
230*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64ole
231*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ole float %lhs32, %rhs32
232*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
233*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
234*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s1, s0
235*9880d681SAndroid Build Coastguard Worker; CHECK: vselge.f64 d16, d1, d2
236*9880d681SAndroid Build Coastguard Worker  ret void
237*9880d681SAndroid Build Coastguard Worker}
238*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32ule(float %lhs32, float %rhs32, float %a, float %b) {
239*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32ule
240*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ule float %lhs32, %rhs32
241*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
242*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
243*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
244*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f32 s0, s3, s2
245*9880d681SAndroid Build Coastguard Worker  ret void
246*9880d681SAndroid Build Coastguard Worker}
247*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64ule(float %lhs32, float %rhs32, double %a, double %b) {
248*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64ule
249*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ule float %lhs32, %rhs32
250*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
251*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
252*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
253*9880d681SAndroid Build Coastguard Worker; CHECK: vselgt.f64 d16, d2, d1
254*9880d681SAndroid Build Coastguard Worker  ret void
255*9880d681SAndroid Build Coastguard Worker}
256*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32ord(float %lhs32, float %rhs32, float %a, float %b) {
257*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32ord
258*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ord float %lhs32, %rhs32
259*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
260*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
261*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
262*9880d681SAndroid Build Coastguard Worker; CHECK: vselvs.f32 s0, s3, s2
263*9880d681SAndroid Build Coastguard Worker  ret void
264*9880d681SAndroid Build Coastguard Worker}
265*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64ord(float %lhs32, float %rhs32, double %a, double %b) {
266*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64ord
267*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp ord float %lhs32, %rhs32
268*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
269*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
270*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
271*9880d681SAndroid Build Coastguard Worker; CHECK: vselvs.f64 d16, d2, d1
272*9880d681SAndroid Build Coastguard Worker  ret void
273*9880d681SAndroid Build Coastguard Worker}
274*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32une(float %lhs32, float %rhs32, float %a, float %b) {
275*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32une
276*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp une float %lhs32, %rhs32
277*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
278*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
279*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
280*9880d681SAndroid Build Coastguard Worker; CHECK: vseleq.f32 s0, s3, s2
281*9880d681SAndroid Build Coastguard Worker  ret void
282*9880d681SAndroid Build Coastguard Worker}
283*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64une(float %lhs32, float %rhs32, double %a, double %b) {
284*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64une
285*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp une float %lhs32, %rhs32
286*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
287*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
288*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
289*9880d681SAndroid Build Coastguard Worker; CHECK: vseleq.f64 d16, d2, d1
290*9880d681SAndroid Build Coastguard Worker  ret void
291*9880d681SAndroid Build Coastguard Worker}
292*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel32uno(float %lhs32, float %rhs32, float %a, float %b) {
293*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel32uno
294*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp uno float %lhs32, %rhs32
295*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, float %a, float %b
296*9880d681SAndroid Build Coastguard Worker  store float %val1, float* @varfloat
297*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
298*9880d681SAndroid Build Coastguard Worker; CHECK: vselvs.f32 s0, s2, s3
299*9880d681SAndroid Build Coastguard Worker  ret void
300*9880d681SAndroid Build Coastguard Worker}
301*9880d681SAndroid Build Coastguard Workerdefine void @test_vsel64uno(float %lhs32, float %rhs32, double %a, double %b) {
302*9880d681SAndroid Build Coastguard Worker; CHECK: test_vsel64uno
303*9880d681SAndroid Build Coastguard Worker  %tst1 = fcmp uno float %lhs32, %rhs32
304*9880d681SAndroid Build Coastguard Worker  %val1 = select i1 %tst1, double %a, double %b
305*9880d681SAndroid Build Coastguard Worker  store double %val1, double* @vardouble
306*9880d681SAndroid Build Coastguard Worker; CHECK: vcmpe.f32 s0, s1
307*9880d681SAndroid Build Coastguard Worker; CHECK: vselvs.f64 d16, d1, d2
308*9880d681SAndroid Build Coastguard Worker  ret void
309*9880d681SAndroid Build Coastguard Worker}
310