1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names --enable-unsafe-fp-math \
3 ; RUN: -verify-machineinstrs --enable-no-signed-zeros-fp-math \
4 ; RUN: --enable-no-nans-fp-math --enable-no-infs-fp-math \
5 ; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \
6 ; RUN: --check-prefix=FAST-P8
7 ; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names --enable-unsafe-fp-math \
8 ; RUN: -verify-machineinstrs --enable-no-signed-zeros-fp-math \
9 ; RUN: --enable-no-nans-fp-math --enable-no-infs-fp-math \
10 ; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \
11 ; RUN: --check-prefix=FAST-P9
12 ; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names -verify-machineinstrs \
13 ; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \
14 ; RUN: --check-prefix=NO-FAST-P8
15 ; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names -verify-machineinstrs \
16 ; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \
17 ; RUN: --check-prefix=NO-FAST-P9
20 define float @select_oeq_float(float %a, float %b, float %c, float %d) {
21 ; FAST-P8-LABEL: select_oeq_float:
22 ; FAST-P8: # %bb.0: # %entry
23 ; FAST-P8-NEXT: xssubsp f0, f2, f1
24 ; FAST-P8-NEXT: xssubsp f1, f1, f2
25 ; FAST-P8-NEXT: fsel f1, f1, f3, f4
26 ; FAST-P8-NEXT: fsel f1, f0, f1, f4
29 ; FAST-P9-LABEL: select_oeq_float:
30 ; FAST-P9: # %bb.0: # %entry
31 ; FAST-P9-NEXT: xssubsp f0, f2, f1
32 ; FAST-P9-NEXT: xssubsp f1, f1, f2
33 ; FAST-P9-NEXT: fsel f1, f1, f3, f4
34 ; FAST-P9-NEXT: fsel f1, f0, f1, f4
37 ; NO-FAST-P8-LABEL: select_oeq_float:
38 ; NO-FAST-P8: # %bb.0: # %entry
39 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
40 ; NO-FAST-P8-NEXT: beq cr0, .LBB0_2
41 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
42 ; NO-FAST-P8-NEXT: fmr f3, f4
43 ; NO-FAST-P8-NEXT: .LBB0_2: # %entry
44 ; NO-FAST-P8-NEXT: fmr f1, f3
45 ; NO-FAST-P8-NEXT: blr
47 ; NO-FAST-P9-LABEL: select_oeq_float:
48 ; NO-FAST-P9: # %bb.0: # %entry
49 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
50 ; NO-FAST-P9-NEXT: beq cr0, .LBB0_2
51 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
52 ; NO-FAST-P9-NEXT: fmr f3, f4
53 ; NO-FAST-P9-NEXT: .LBB0_2: # %entry
54 ; NO-FAST-P9-NEXT: fmr f1, f3
55 ; NO-FAST-P9-NEXT: blr
57 %cmp = fcmp oeq float %a, %b
58 %cond = select i1 %cmp, float %c, float %d
62 define double @select_oeq_double(double %a, double %b, double %c, double %d) {
63 ; FAST-P8-LABEL: select_oeq_double:
64 ; FAST-P8: # %bb.0: # %entry
65 ; FAST-P8-NEXT: xssubdp f0, f1, f2
66 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
67 ; FAST-P8-NEXT: xsnegdp f0, f0
68 ; FAST-P8-NEXT: fsel f1, f0, f1, f4
71 ; FAST-P9-LABEL: select_oeq_double:
72 ; FAST-P9: # %bb.0: # %entry
73 ; FAST-P9-NEXT: xssubdp f0, f1, f2
74 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
75 ; FAST-P9-NEXT: xsnegdp f0, f0
76 ; FAST-P9-NEXT: fsel f1, f0, f1, f4
79 ; NO-FAST-P8-LABEL: select_oeq_double:
80 ; NO-FAST-P8: # %bb.0: # %entry
81 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f2
82 ; NO-FAST-P8-NEXT: beq cr0, .LBB1_2
83 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
84 ; NO-FAST-P8-NEXT: fmr f3, f4
85 ; NO-FAST-P8-NEXT: .LBB1_2: # %entry
86 ; NO-FAST-P8-NEXT: fmr f1, f3
87 ; NO-FAST-P8-NEXT: blr
89 ; NO-FAST-P9-LABEL: select_oeq_double:
90 ; NO-FAST-P9: # %bb.0: # %entry
91 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f2
92 ; NO-FAST-P9-NEXT: beq cr0, .LBB1_2
93 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
94 ; NO-FAST-P9-NEXT: fmr f3, f4
95 ; NO-FAST-P9-NEXT: .LBB1_2: # %entry
96 ; NO-FAST-P9-NEXT: fmr f1, f3
97 ; NO-FAST-P9-NEXT: blr
99 %cmp = fcmp oeq double %a, %b
100 %cond = select i1 %cmp, double %c, double %d
104 define float @select_fast_oeq_float(float %a, float %b, float %c, float %d) {
105 ; FAST-P8-LABEL: select_fast_oeq_float:
106 ; FAST-P8: # %bb.0: # %entry
107 ; FAST-P8-NEXT: xssubsp f0, f2, f1
108 ; FAST-P8-NEXT: xssubsp f1, f1, f2
109 ; FAST-P8-NEXT: fsel f1, f1, f3, f4
110 ; FAST-P8-NEXT: fsel f1, f0, f1, f4
113 ; FAST-P9-LABEL: select_fast_oeq_float:
114 ; FAST-P9: # %bb.0: # %entry
115 ; FAST-P9-NEXT: xssubsp f0, f2, f1
116 ; FAST-P9-NEXT: xssubsp f1, f1, f2
117 ; FAST-P9-NEXT: fsel f1, f1, f3, f4
118 ; FAST-P9-NEXT: fsel f1, f0, f1, f4
121 ; NO-FAST-P8-LABEL: select_fast_oeq_float:
122 ; NO-FAST-P8: # %bb.0: # %entry
123 ; NO-FAST-P8-NEXT: xssubsp f0, f2, f1
124 ; NO-FAST-P8-NEXT: xssubsp f1, f1, f2
125 ; NO-FAST-P8-NEXT: fsel f1, f1, f3, f4
126 ; NO-FAST-P8-NEXT: fsel f1, f0, f1, f4
127 ; NO-FAST-P8-NEXT: blr
129 ; NO-FAST-P9-LABEL: select_fast_oeq_float:
130 ; NO-FAST-P9: # %bb.0: # %entry
131 ; NO-FAST-P9-NEXT: xssubsp f0, f2, f1
132 ; NO-FAST-P9-NEXT: xssubsp f1, f1, f2
133 ; NO-FAST-P9-NEXT: fsel f1, f1, f3, f4
134 ; NO-FAST-P9-NEXT: fsel f1, f0, f1, f4
135 ; NO-FAST-P9-NEXT: blr
137 %cmp = fcmp nnan ninf nsz oeq float %a, %b
138 %cond = select i1 %cmp, float %c, float %d
142 define double @select_fast_oeq_double(double %a, double %b, double %c, double %d) {
143 ; FAST-P8-LABEL: select_fast_oeq_double:
144 ; FAST-P8: # %bb.0: # %entry
145 ; FAST-P8-NEXT: xssubdp f0, f1, f2
146 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
147 ; FAST-P8-NEXT: xsnegdp f0, f0
148 ; FAST-P8-NEXT: fsel f1, f0, f1, f4
151 ; FAST-P9-LABEL: select_fast_oeq_double:
152 ; FAST-P9: # %bb.0: # %entry
153 ; FAST-P9-NEXT: xssubdp f0, f1, f2
154 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
155 ; FAST-P9-NEXT: xsnegdp f0, f0
156 ; FAST-P9-NEXT: fsel f1, f0, f1, f4
159 ; NO-FAST-P8-LABEL: select_fast_oeq_double:
160 ; NO-FAST-P8: # %bb.0: # %entry
161 ; NO-FAST-P8-NEXT: xssubdp f0, f1, f2
162 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
163 ; NO-FAST-P8-NEXT: xsnegdp f0, f0
164 ; NO-FAST-P8-NEXT: fsel f1, f0, f1, f4
165 ; NO-FAST-P8-NEXT: blr
167 ; NO-FAST-P9-LABEL: select_fast_oeq_double:
168 ; NO-FAST-P9: # %bb.0: # %entry
169 ; NO-FAST-P9-NEXT: xssubdp f0, f1, f2
170 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
171 ; NO-FAST-P9-NEXT: xsnegdp f0, f0
172 ; NO-FAST-P9-NEXT: fsel f1, f0, f1, f4
173 ; NO-FAST-P9-NEXT: blr
175 %cmp = fcmp nnan ninf nsz oeq double %a, %b
176 %cond = select i1 %cmp, double %c, double %d
182 define float @select_one_float(float %a, float %b, float %c, float %d) {
183 ; FAST-P8-LABEL: select_one_float:
184 ; FAST-P8: # %bb.0: # %entry
185 ; FAST-P8-NEXT: xssubsp f0, f2, f1
186 ; FAST-P8-NEXT: xssubsp f1, f1, f2
187 ; FAST-P8-NEXT: fsel f1, f1, f4, f3
188 ; FAST-P8-NEXT: fsel f1, f0, f1, f3
191 ; FAST-P9-LABEL: select_one_float:
192 ; FAST-P9: # %bb.0: # %entry
193 ; FAST-P9-NEXT: xssubsp f0, f2, f1
194 ; FAST-P9-NEXT: xssubsp f1, f1, f2
195 ; FAST-P9-NEXT: fsel f1, f1, f4, f3
196 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
199 ; NO-FAST-P8-LABEL: select_one_float:
200 ; NO-FAST-P8: # %bb.0: # %entry
201 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
202 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, eq
203 ; NO-FAST-P8-NEXT: bc 12, 4*cr5+lt, .LBB4_2
204 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
205 ; NO-FAST-P8-NEXT: fmr f3, f4
206 ; NO-FAST-P8-NEXT: .LBB4_2: # %entry
207 ; NO-FAST-P8-NEXT: fmr f1, f3
208 ; NO-FAST-P8-NEXT: blr
210 ; NO-FAST-P9-LABEL: select_one_float:
211 ; NO-FAST-P9: # %bb.0: # %entry
212 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
213 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, eq
214 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB4_2
215 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
216 ; NO-FAST-P9-NEXT: fmr f3, f4
217 ; NO-FAST-P9-NEXT: .LBB4_2: # %entry
218 ; NO-FAST-P9-NEXT: fmr f1, f3
219 ; NO-FAST-P9-NEXT: blr
221 %cmp = fcmp one float %a, %b
222 %cond = select i1 %cmp, float %c, float %d
226 define double @select_one_double(double %a, double %b, double %c, double %d) {
227 ; FAST-P8-LABEL: select_one_double:
228 ; FAST-P8: # %bb.0: # %entry
229 ; FAST-P8-NEXT: xssubdp f0, f1, f2
230 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
231 ; FAST-P8-NEXT: xsnegdp f0, f0
232 ; FAST-P8-NEXT: fsel f1, f0, f1, f3
235 ; FAST-P9-LABEL: select_one_double:
236 ; FAST-P9: # %bb.0: # %entry
237 ; FAST-P9-NEXT: xssubdp f0, f1, f2
238 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
239 ; FAST-P9-NEXT: xsnegdp f0, f0
240 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
243 ; NO-FAST-P8-LABEL: select_one_double:
244 ; NO-FAST-P8: # %bb.0: # %entry
245 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
246 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, eq
247 ; NO-FAST-P8-NEXT: bc 12, 4*cr5+lt, .LBB5_2
248 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
249 ; NO-FAST-P8-NEXT: fmr f3, f4
250 ; NO-FAST-P8-NEXT: .LBB5_2: # %entry
251 ; NO-FAST-P8-NEXT: fmr f1, f3
252 ; NO-FAST-P8-NEXT: blr
254 ; NO-FAST-P9-LABEL: select_one_double:
255 ; NO-FAST-P9: # %bb.0: # %entry
256 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
257 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, eq
258 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB5_2
259 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
260 ; NO-FAST-P9-NEXT: fmr f3, f4
261 ; NO-FAST-P9-NEXT: .LBB5_2: # %entry
262 ; NO-FAST-P9-NEXT: fmr f1, f3
263 ; NO-FAST-P9-NEXT: blr
265 %cmp = fcmp one double %a, %b
266 %cond = select i1 %cmp, double %c, double %d
270 define float @select_fast_one_float(float %a, float %b, float %c, float %d) {
271 ; FAST-P8-LABEL: select_fast_one_float:
272 ; FAST-P8: # %bb.0: # %entry
273 ; FAST-P8-NEXT: xssubsp f0, f2, f1
274 ; FAST-P8-NEXT: xssubsp f1, f1, f2
275 ; FAST-P8-NEXT: fsel f1, f1, f4, f3
276 ; FAST-P8-NEXT: fsel f1, f0, f1, f3
279 ; FAST-P9-LABEL: select_fast_one_float:
280 ; FAST-P9: # %bb.0: # %entry
281 ; FAST-P9-NEXT: xssubsp f0, f2, f1
282 ; FAST-P9-NEXT: xssubsp f1, f1, f2
283 ; FAST-P9-NEXT: fsel f1, f1, f4, f3
284 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
287 ; NO-FAST-P8-LABEL: select_fast_one_float:
288 ; NO-FAST-P8: # %bb.0: # %entry
289 ; NO-FAST-P8-NEXT: xssubsp f0, f2, f1
290 ; NO-FAST-P8-NEXT: xssubsp f1, f1, f2
291 ; NO-FAST-P8-NEXT: fsel f1, f1, f4, f3
292 ; NO-FAST-P8-NEXT: fsel f1, f0, f1, f3
293 ; NO-FAST-P8-NEXT: blr
295 ; NO-FAST-P9-LABEL: select_fast_one_float:
296 ; NO-FAST-P9: # %bb.0: # %entry
297 ; NO-FAST-P9-NEXT: xssubsp f0, f2, f1
298 ; NO-FAST-P9-NEXT: xssubsp f1, f1, f2
299 ; NO-FAST-P9-NEXT: fsel f1, f1, f4, f3
300 ; NO-FAST-P9-NEXT: fsel f1, f0, f1, f3
301 ; NO-FAST-P9-NEXT: blr
303 %cmp = fcmp nnan ninf nsz one float %a, %b
304 %cond = select i1 %cmp, float %c, float %d
308 define double @select_fast_one_double(double %a, double %b, double %c, double %d) {
309 ; FAST-P8-LABEL: select_fast_one_double:
310 ; FAST-P8: # %bb.0: # %entry
311 ; FAST-P8-NEXT: xssubdp f0, f1, f2
312 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
313 ; FAST-P8-NEXT: xsnegdp f0, f0
314 ; FAST-P8-NEXT: fsel f1, f0, f1, f3
317 ; FAST-P9-LABEL: select_fast_one_double:
318 ; FAST-P9: # %bb.0: # %entry
319 ; FAST-P9-NEXT: xssubdp f0, f1, f2
320 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
321 ; FAST-P9-NEXT: xsnegdp f0, f0
322 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
325 ; NO-FAST-P8-LABEL: select_fast_one_double:
326 ; NO-FAST-P8: # %bb.0: # %entry
327 ; NO-FAST-P8-NEXT: xssubdp f0, f1, f2
328 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
329 ; NO-FAST-P8-NEXT: xsnegdp f0, f0
330 ; NO-FAST-P8-NEXT: fsel f1, f0, f1, f3
331 ; NO-FAST-P8-NEXT: blr
333 ; NO-FAST-P9-LABEL: select_fast_one_double:
334 ; NO-FAST-P9: # %bb.0: # %entry
335 ; NO-FAST-P9-NEXT: xssubdp f0, f1, f2
336 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
337 ; NO-FAST-P9-NEXT: xsnegdp f0, f0
338 ; NO-FAST-P9-NEXT: fsel f1, f0, f1, f3
339 ; NO-FAST-P9-NEXT: blr
341 %cmp = fcmp nnan ninf nsz one double %a, %b
342 %cond = select i1 %cmp, double %c, double %d
348 define float @select_oge_float(float %a, float %b, float %c, float %d) {
349 ; FAST-P8-LABEL: select_oge_float:
350 ; FAST-P8: # %bb.0: # %entry
351 ; FAST-P8-NEXT: xssubsp f0, f1, f2
352 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
355 ; FAST-P9-LABEL: select_oge_float:
356 ; FAST-P9: # %bb.0: # %entry
357 ; FAST-P9-NEXT: xssubsp f0, f1, f2
358 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
361 ; NO-FAST-P8-LABEL: select_oge_float:
362 ; NO-FAST-P8: # %bb.0: # %entry
363 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
364 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, lt
365 ; NO-FAST-P8-NEXT: bc 12, 4*cr5+lt, .LBB8_2
366 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
367 ; NO-FAST-P8-NEXT: fmr f3, f4
368 ; NO-FAST-P8-NEXT: .LBB8_2: # %entry
369 ; NO-FAST-P8-NEXT: fmr f1, f3
370 ; NO-FAST-P8-NEXT: blr
372 ; NO-FAST-P9-LABEL: select_oge_float:
373 ; NO-FAST-P9: # %bb.0: # %entry
374 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
375 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, lt
376 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB8_2
377 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
378 ; NO-FAST-P9-NEXT: fmr f3, f4
379 ; NO-FAST-P9-NEXT: .LBB8_2: # %entry
380 ; NO-FAST-P9-NEXT: fmr f1, f3
381 ; NO-FAST-P9-NEXT: blr
383 %cmp = fcmp oge float %a, %b
384 %cond = select i1 %cmp, float %c, float %d
388 define double @select_oge_double(double %a, double %b, double %c, double %d) {
389 ; FAST-P8-LABEL: select_oge_double:
390 ; FAST-P8: # %bb.0: # %entry
391 ; FAST-P8-NEXT: xssubdp f0, f1, f2
392 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
395 ; FAST-P9-LABEL: select_oge_double:
396 ; FAST-P9: # %bb.0: # %entry
397 ; FAST-P9-NEXT: xssubdp f0, f1, f2
398 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
401 ; NO-FAST-P8-LABEL: select_oge_double:
402 ; NO-FAST-P8: # %bb.0: # %entry
403 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
404 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, lt
405 ; NO-FAST-P8-NEXT: bc 12, 4*cr5+lt, .LBB9_2
406 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
407 ; NO-FAST-P8-NEXT: fmr f3, f4
408 ; NO-FAST-P8-NEXT: .LBB9_2: # %entry
409 ; NO-FAST-P8-NEXT: fmr f1, f3
410 ; NO-FAST-P8-NEXT: blr
412 ; NO-FAST-P9-LABEL: select_oge_double:
413 ; NO-FAST-P9: # %bb.0: # %entry
414 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
415 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, lt
416 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB9_2
417 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
418 ; NO-FAST-P9-NEXT: fmr f3, f4
419 ; NO-FAST-P9-NEXT: .LBB9_2: # %entry
420 ; NO-FAST-P9-NEXT: fmr f1, f3
421 ; NO-FAST-P9-NEXT: blr
423 %cmp = fcmp oge double %a, %b
424 %cond = select i1 %cmp, double %c, double %d
428 define float @select_fast_oge_float(float %a, float %b, float %c, float %d) {
429 ; FAST-P8-LABEL: select_fast_oge_float:
430 ; FAST-P8: # %bb.0: # %entry
431 ; FAST-P8-NEXT: xssubsp f0, f1, f2
432 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
435 ; FAST-P9-LABEL: select_fast_oge_float:
436 ; FAST-P9: # %bb.0: # %entry
437 ; FAST-P9-NEXT: xssubsp f0, f1, f2
438 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
441 ; NO-FAST-P8-LABEL: select_fast_oge_float:
442 ; NO-FAST-P8: # %bb.0: # %entry
443 ; NO-FAST-P8-NEXT: xssubsp f0, f1, f2
444 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
445 ; NO-FAST-P8-NEXT: blr
447 ; NO-FAST-P9-LABEL: select_fast_oge_float:
448 ; NO-FAST-P9: # %bb.0: # %entry
449 ; NO-FAST-P9-NEXT: xssubsp f0, f1, f2
450 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
451 ; NO-FAST-P9-NEXT: blr
453 %cmp = fcmp nnan ninf nsz oge float %a, %b
454 %cond = select i1 %cmp, float %c, float %d
458 define double @select_fast_oge_double(double %a, double %b, double %c, double %d) {
459 ; FAST-P8-LABEL: select_fast_oge_double:
460 ; FAST-P8: # %bb.0: # %entry
461 ; FAST-P8-NEXT: xssubdp f0, f1, f2
462 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
465 ; FAST-P9-LABEL: select_fast_oge_double:
466 ; FAST-P9: # %bb.0: # %entry
467 ; FAST-P9-NEXT: xssubdp f0, f1, f2
468 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
471 ; NO-FAST-P8-LABEL: select_fast_oge_double:
472 ; NO-FAST-P8: # %bb.0: # %entry
473 ; NO-FAST-P8-NEXT: xssubdp f0, f1, f2
474 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
475 ; NO-FAST-P8-NEXT: blr
477 ; NO-FAST-P9-LABEL: select_fast_oge_double:
478 ; NO-FAST-P9: # %bb.0: # %entry
479 ; NO-FAST-P9-NEXT: xssubdp f0, f1, f2
480 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
481 ; NO-FAST-P9-NEXT: blr
483 %cmp = fcmp nnan ninf nsz oge double %a, %b
484 %cond = select i1 %cmp, double %c, double %d
490 define float @select_olt_float(float %a, float %b, float %c, float %d) {
491 ; FAST-P8-LABEL: select_olt_float:
492 ; FAST-P8: # %bb.0: # %entry
493 ; FAST-P8-NEXT: xssubsp f0, f1, f2
494 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
497 ; FAST-P9-LABEL: select_olt_float:
498 ; FAST-P9: # %bb.0: # %entry
499 ; FAST-P9-NEXT: xssubsp f0, f1, f2
500 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
503 ; NO-FAST-P8-LABEL: select_olt_float:
504 ; NO-FAST-P8: # %bb.0: # %entry
505 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
506 ; NO-FAST-P8-NEXT: blt cr0, .LBB12_2
507 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
508 ; NO-FAST-P8-NEXT: fmr f3, f4
509 ; NO-FAST-P8-NEXT: .LBB12_2: # %entry
510 ; NO-FAST-P8-NEXT: fmr f1, f3
511 ; NO-FAST-P8-NEXT: blr
513 ; NO-FAST-P9-LABEL: select_olt_float:
514 ; NO-FAST-P9: # %bb.0: # %entry
515 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
516 ; NO-FAST-P9-NEXT: blt cr0, .LBB12_2
517 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
518 ; NO-FAST-P9-NEXT: fmr f3, f4
519 ; NO-FAST-P9-NEXT: .LBB12_2: # %entry
520 ; NO-FAST-P9-NEXT: fmr f1, f3
521 ; NO-FAST-P9-NEXT: blr
523 %cmp = fcmp olt float %a, %b
524 %cond = select i1 %cmp, float %c, float %d
528 define double @select_olt_double(double %a, double %b, double %c, double %d) {
529 ; FAST-P8-LABEL: select_olt_double:
530 ; FAST-P8: # %bb.0: # %entry
531 ; FAST-P8-NEXT: xssubdp f0, f1, f2
532 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
535 ; FAST-P9-LABEL: select_olt_double:
536 ; FAST-P9: # %bb.0: # %entry
537 ; FAST-P9-NEXT: xssubdp f0, f1, f2
538 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
541 ; NO-FAST-P8-LABEL: select_olt_double:
542 ; NO-FAST-P8: # %bb.0: # %entry
543 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f2
544 ; NO-FAST-P8-NEXT: blt cr0, .LBB13_2
545 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
546 ; NO-FAST-P8-NEXT: fmr f3, f4
547 ; NO-FAST-P8-NEXT: .LBB13_2: # %entry
548 ; NO-FAST-P8-NEXT: fmr f1, f3
549 ; NO-FAST-P8-NEXT: blr
551 ; NO-FAST-P9-LABEL: select_olt_double:
552 ; NO-FAST-P9: # %bb.0: # %entry
553 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f2
554 ; NO-FAST-P9-NEXT: blt cr0, .LBB13_2
555 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
556 ; NO-FAST-P9-NEXT: fmr f3, f4
557 ; NO-FAST-P9-NEXT: .LBB13_2: # %entry
558 ; NO-FAST-P9-NEXT: fmr f1, f3
559 ; NO-FAST-P9-NEXT: blr
561 %cmp = fcmp olt double %a, %b
562 %cond = select i1 %cmp, double %c, double %d
566 define float @select_fast_olt_float(float %a, float %b, float %c, float %d) {
567 ; FAST-P8-LABEL: select_fast_olt_float:
568 ; FAST-P8: # %bb.0: # %entry
569 ; FAST-P8-NEXT: xssubsp f0, f1, f2
570 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
573 ; FAST-P9-LABEL: select_fast_olt_float:
574 ; FAST-P9: # %bb.0: # %entry
575 ; FAST-P9-NEXT: xssubsp f0, f1, f2
576 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
579 ; NO-FAST-P8-LABEL: select_fast_olt_float:
580 ; NO-FAST-P8: # %bb.0: # %entry
581 ; NO-FAST-P8-NEXT: xssubsp f0, f1, f2
582 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
583 ; NO-FAST-P8-NEXT: blr
585 ; NO-FAST-P9-LABEL: select_fast_olt_float:
586 ; NO-FAST-P9: # %bb.0: # %entry
587 ; NO-FAST-P9-NEXT: xssubsp f0, f1, f2
588 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
589 ; NO-FAST-P9-NEXT: blr
591 %cmp = fcmp ninf nnan nsz olt float %a, %b
592 %cond = select i1 %cmp, float %c, float %d
596 define double @select_fast_olt_double(double %a, double %b, double %c, double %d) {
597 ; FAST-P8-LABEL: select_fast_olt_double:
598 ; FAST-P8: # %bb.0: # %entry
599 ; FAST-P8-NEXT: xssubdp f0, f1, f2
600 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
603 ; FAST-P9-LABEL: select_fast_olt_double:
604 ; FAST-P9: # %bb.0: # %entry
605 ; FAST-P9-NEXT: xssubdp f0, f1, f2
606 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
609 ; NO-FAST-P8-LABEL: select_fast_olt_double:
610 ; NO-FAST-P8: # %bb.0: # %entry
611 ; NO-FAST-P8-NEXT: xssubdp f0, f1, f2
612 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
613 ; NO-FAST-P8-NEXT: blr
615 ; NO-FAST-P9-LABEL: select_fast_olt_double:
616 ; NO-FAST-P9: # %bb.0: # %entry
617 ; NO-FAST-P9-NEXT: xssubdp f0, f1, f2
618 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
619 ; NO-FAST-P9-NEXT: blr
621 %cmp = fcmp nnan ninf nsz olt double %a, %b
622 %cond = select i1 %cmp, double %c, double %d
628 define float @select_ogt_float(float %a, float %b, float %c, float %d) {
629 ; FAST-P8-LABEL: select_ogt_float:
630 ; FAST-P8: # %bb.0: # %entry
631 ; FAST-P8-NEXT: xssubsp f0, f2, f1
632 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
635 ; FAST-P9-LABEL: select_ogt_float:
636 ; FAST-P9: # %bb.0: # %entry
637 ; FAST-P9-NEXT: xssubsp f0, f2, f1
638 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
641 ; NO-FAST-P8-LABEL: select_ogt_float:
642 ; NO-FAST-P8: # %bb.0: # %entry
643 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
644 ; NO-FAST-P8-NEXT: bgt cr0, .LBB16_2
645 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
646 ; NO-FAST-P8-NEXT: fmr f3, f4
647 ; NO-FAST-P8-NEXT: .LBB16_2: # %entry
648 ; NO-FAST-P8-NEXT: fmr f1, f3
649 ; NO-FAST-P8-NEXT: blr
651 ; NO-FAST-P9-LABEL: select_ogt_float:
652 ; NO-FAST-P9: # %bb.0: # %entry
653 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
654 ; NO-FAST-P9-NEXT: bgt cr0, .LBB16_2
655 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
656 ; NO-FAST-P9-NEXT: fmr f3, f4
657 ; NO-FAST-P9-NEXT: .LBB16_2: # %entry
658 ; NO-FAST-P9-NEXT: fmr f1, f3
659 ; NO-FAST-P9-NEXT: blr
661 %cmp = fcmp ogt float %a, %b
662 %cond = select i1 %cmp, float %c, float %d
666 define double @select_ogt_double(double %a, double %b, double %c, double %d) {
667 ; FAST-P8-LABEL: select_ogt_double:
668 ; FAST-P8: # %bb.0: # %entry
669 ; FAST-P8-NEXT: xssubdp f0, f2, f1
670 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
673 ; FAST-P9-LABEL: select_ogt_double:
674 ; FAST-P9: # %bb.0: # %entry
675 ; FAST-P9-NEXT: xssubdp f0, f2, f1
676 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
679 ; NO-FAST-P8-LABEL: select_ogt_double:
680 ; NO-FAST-P8: # %bb.0: # %entry
681 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f2
682 ; NO-FAST-P8-NEXT: bgt cr0, .LBB17_2
683 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
684 ; NO-FAST-P8-NEXT: fmr f3, f4
685 ; NO-FAST-P8-NEXT: .LBB17_2: # %entry
686 ; NO-FAST-P8-NEXT: fmr f1, f3
687 ; NO-FAST-P8-NEXT: blr
689 ; NO-FAST-P9-LABEL: select_ogt_double:
690 ; NO-FAST-P9: # %bb.0: # %entry
691 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f2
692 ; NO-FAST-P9-NEXT: bgt cr0, .LBB17_2
693 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
694 ; NO-FAST-P9-NEXT: fmr f3, f4
695 ; NO-FAST-P9-NEXT: .LBB17_2: # %entry
696 ; NO-FAST-P9-NEXT: fmr f1, f3
697 ; NO-FAST-P9-NEXT: blr
699 %cmp = fcmp ogt double %a, %b
700 %cond = select i1 %cmp, double %c, double %d
704 define float @select_fast_ogt_float(float %a, float %b, float %c, float %d) {
705 ; FAST-P8-LABEL: select_fast_ogt_float:
706 ; FAST-P8: # %bb.0: # %entry
707 ; FAST-P8-NEXT: xssubsp f0, f2, f1
708 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
711 ; FAST-P9-LABEL: select_fast_ogt_float:
712 ; FAST-P9: # %bb.0: # %entry
713 ; FAST-P9-NEXT: xssubsp f0, f2, f1
714 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
717 ; NO-FAST-P8-LABEL: select_fast_ogt_float:
718 ; NO-FAST-P8: # %bb.0: # %entry
719 ; NO-FAST-P8-NEXT: xssubsp f0, f2, f1
720 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
721 ; NO-FAST-P8-NEXT: blr
723 ; NO-FAST-P9-LABEL: select_fast_ogt_float:
724 ; NO-FAST-P9: # %bb.0: # %entry
725 ; NO-FAST-P9-NEXT: xssubsp f0, f2, f1
726 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
727 ; NO-FAST-P9-NEXT: blr
729 %cmp = fcmp nnan ninf nsz ogt float %a, %b
730 %cond = select i1 %cmp, float %c, float %d
734 define double @select_fast_ogt_double(double %a, double %b, double %c, double %d) {
735 ; FAST-P8-LABEL: select_fast_ogt_double:
736 ; FAST-P8: # %bb.0: # %entry
737 ; FAST-P8-NEXT: xssubdp f0, f2, f1
738 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
741 ; FAST-P9-LABEL: select_fast_ogt_double:
742 ; FAST-P9: # %bb.0: # %entry
743 ; FAST-P9-NEXT: xssubdp f0, f2, f1
744 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
747 ; NO-FAST-P8-LABEL: select_fast_ogt_double:
748 ; NO-FAST-P8: # %bb.0: # %entry
749 ; NO-FAST-P8-NEXT: xssubdp f0, f2, f1
750 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
751 ; NO-FAST-P8-NEXT: blr
753 ; NO-FAST-P9-LABEL: select_fast_ogt_double:
754 ; NO-FAST-P9: # %bb.0: # %entry
755 ; NO-FAST-P9-NEXT: xssubdp f0, f2, f1
756 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
757 ; NO-FAST-P9-NEXT: blr
759 %cmp = fcmp nnan ninf nsz ogt double %a, %b
760 %cond = select i1 %cmp, double %c, double %d
766 define float @select_ole_float(float %a, float %b, float %c, float %d) {
767 ; FAST-P8-LABEL: select_ole_float:
768 ; FAST-P8: # %bb.0: # %entry
769 ; FAST-P8-NEXT: xssubsp f0, f2, f1
770 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
773 ; FAST-P9-LABEL: select_ole_float:
774 ; FAST-P9: # %bb.0: # %entry
775 ; FAST-P9-NEXT: xssubsp f0, f2, f1
776 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
779 ; NO-FAST-P8-LABEL: select_ole_float:
780 ; NO-FAST-P8: # %bb.0: # %entry
781 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
782 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, gt
783 ; NO-FAST-P8-NEXT: bc 12, 4*cr5+lt, .LBB20_2
784 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
785 ; NO-FAST-P8-NEXT: fmr f3, f4
786 ; NO-FAST-P8-NEXT: .LBB20_2: # %entry
787 ; NO-FAST-P8-NEXT: fmr f1, f3
788 ; NO-FAST-P8-NEXT: blr
790 ; NO-FAST-P9-LABEL: select_ole_float:
791 ; NO-FAST-P9: # %bb.0: # %entry
792 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
793 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, gt
794 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB20_2
795 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
796 ; NO-FAST-P9-NEXT: fmr f3, f4
797 ; NO-FAST-P9-NEXT: .LBB20_2: # %entry
798 ; NO-FAST-P9-NEXT: fmr f1, f3
799 ; NO-FAST-P9-NEXT: blr
801 %cmp = fcmp ole float %a, %b
802 %cond = select i1 %cmp, float %c, float %d
806 define double @select_ole_double(double %a, double %b, double %c, double %d) {
807 ; FAST-P8-LABEL: select_ole_double:
808 ; FAST-P8: # %bb.0: # %entry
809 ; FAST-P8-NEXT: xssubdp f0, f2, f1
810 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
813 ; FAST-P9-LABEL: select_ole_double:
814 ; FAST-P9: # %bb.0: # %entry
815 ; FAST-P9-NEXT: xssubdp f0, f2, f1
816 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
819 ; NO-FAST-P8-LABEL: select_ole_double:
820 ; NO-FAST-P8: # %bb.0: # %entry
821 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
822 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, gt
823 ; NO-FAST-P8-NEXT: bc 12, 4*cr5+lt, .LBB21_2
824 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
825 ; NO-FAST-P8-NEXT: fmr f3, f4
826 ; NO-FAST-P8-NEXT: .LBB21_2: # %entry
827 ; NO-FAST-P8-NEXT: fmr f1, f3
828 ; NO-FAST-P8-NEXT: blr
830 ; NO-FAST-P9-LABEL: select_ole_double:
831 ; NO-FAST-P9: # %bb.0: # %entry
832 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
833 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, gt
834 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB21_2
835 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
836 ; NO-FAST-P9-NEXT: fmr f3, f4
837 ; NO-FAST-P9-NEXT: .LBB21_2: # %entry
838 ; NO-FAST-P9-NEXT: fmr f1, f3
839 ; NO-FAST-P9-NEXT: blr
841 %cmp = fcmp ole double %a, %b
842 %cond = select i1 %cmp, double %c, double %d
846 define float @select_fast_ole_float(float %a, float %b, float %c, float %d) {
847 ; FAST-P8-LABEL: select_fast_ole_float:
848 ; FAST-P8: # %bb.0: # %entry
849 ; FAST-P8-NEXT: xssubsp f0, f2, f1
850 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
853 ; FAST-P9-LABEL: select_fast_ole_float:
854 ; FAST-P9: # %bb.0: # %entry
855 ; FAST-P9-NEXT: xssubsp f0, f2, f1
856 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
859 ; NO-FAST-P8-LABEL: select_fast_ole_float:
860 ; NO-FAST-P8: # %bb.0: # %entry
861 ; NO-FAST-P8-NEXT: xssubsp f0, f2, f1
862 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
863 ; NO-FAST-P8-NEXT: blr
865 ; NO-FAST-P9-LABEL: select_fast_ole_float:
866 ; NO-FAST-P9: # %bb.0: # %entry
867 ; NO-FAST-P9-NEXT: xssubsp f0, f2, f1
868 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
869 ; NO-FAST-P9-NEXT: blr
871 %cmp = fcmp nnan ninf nsz ole float %a, %b
872 %cond = select i1 %cmp, float %c, float %d
876 define double @select_fast_ole_double(double %a, double %b, double %c, double %d) {
877 ; FAST-P8-LABEL: select_fast_ole_double:
878 ; FAST-P8: # %bb.0: # %entry
879 ; FAST-P8-NEXT: xssubdp f0, f2, f1
880 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
883 ; FAST-P9-LABEL: select_fast_ole_double:
884 ; FAST-P9: # %bb.0: # %entry
885 ; FAST-P9-NEXT: xssubdp f0, f2, f1
886 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
889 ; NO-FAST-P8-LABEL: select_fast_ole_double:
890 ; NO-FAST-P8: # %bb.0: # %entry
891 ; NO-FAST-P8-NEXT: xssubdp f0, f2, f1
892 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
893 ; NO-FAST-P8-NEXT: blr
895 ; NO-FAST-P9-LABEL: select_fast_ole_double:
896 ; NO-FAST-P9: # %bb.0: # %entry
897 ; NO-FAST-P9-NEXT: xssubdp f0, f2, f1
898 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
899 ; NO-FAST-P9-NEXT: blr
901 %cmp = fcmp nnan ninf nsz ole double %a, %b
902 %cond = select i1 %cmp, double %c, double %d
906 ; Test RHS is 1.000000e+00
907 define double @onecmp1(double %a, double %y, double %z) {
908 ; FAST-P8-LABEL: onecmp1:
909 ; FAST-P8: # %bb.0: # %entry
910 ; FAST-P8-NEXT: vspltisw v2, -1
911 ; FAST-P8-NEXT: xvcvsxwdp vs0, vs34
912 ; FAST-P8-NEXT: xsadddp f0, f1, f0
913 ; FAST-P8-NEXT: fsel f1, f0, f2, f3
916 ; FAST-P9-LABEL: onecmp1:
917 ; FAST-P9: # %bb.0: # %entry
918 ; FAST-P9-NEXT: vspltisw v2, -1
919 ; FAST-P9-NEXT: xvcvsxwdp vs0, vs34
920 ; FAST-P9-NEXT: xsadddp f0, f1, f0
921 ; FAST-P9-NEXT: fsel f1, f0, f2, f3
924 ; NO-FAST-P8-LABEL: onecmp1:
925 ; NO-FAST-P8: # %bb.0: # %entry
926 ; NO-FAST-P8-NEXT: vspltisw v2, 1
927 ; NO-FAST-P8-NEXT: xvcvsxwdp vs0, vs34
928 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f0
929 ; NO-FAST-P8-NEXT: bc 12, lt, .LBB24_3
930 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
931 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f1
932 ; NO-FAST-P8-NEXT: bc 12, un, .LBB24_3
933 ; NO-FAST-P8-NEXT: # %bb.2: # %entry
934 ; NO-FAST-P8-NEXT: fmr f3, f2
935 ; NO-FAST-P8-NEXT: .LBB24_3: # %entry
936 ; NO-FAST-P8-NEXT: fmr f1, f3
937 ; NO-FAST-P8-NEXT: blr
939 ; NO-FAST-P9-LABEL: onecmp1:
940 ; NO-FAST-P9: # %bb.0: # %entry
941 ; NO-FAST-P9-NEXT: vspltisw v2, 1
942 ; NO-FAST-P9-NEXT: xvcvsxwdp vs0, vs34
943 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f0
944 ; NO-FAST-P9-NEXT: bc 12, lt, .LBB24_3
945 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
946 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f1
947 ; NO-FAST-P9-NEXT: bc 12, un, .LBB24_3
948 ; NO-FAST-P9-NEXT: # %bb.2: # %entry
949 ; NO-FAST-P9-NEXT: fmr f3, f2
950 ; NO-FAST-P9-NEXT: .LBB24_3: # %entry
951 ; NO-FAST-P9-NEXT: fmr f1, f3
952 ; NO-FAST-P9-NEXT: blr
954 %cmp = fcmp ult double %a, 1.000000e+00
955 %z.y = select i1 %cmp, double %z, double %y
959 define double @onecmp2(double %a, double %y, double %z) {
960 ; FAST-P8-LABEL: onecmp2:
961 ; FAST-P8: # %bb.0: # %entry
962 ; FAST-P8-NEXT: vspltisw v2, 1
963 ; FAST-P8-NEXT: xvcvsxwdp vs0, vs34
964 ; FAST-P8-NEXT: xssubdp f0, f0, f1
965 ; FAST-P8-NEXT: fsel f1, f0, f3, f2
968 ; FAST-P9-LABEL: onecmp2:
969 ; FAST-P9: # %bb.0: # %entry
970 ; FAST-P9-NEXT: vspltisw v2, 1
971 ; FAST-P9-NEXT: xvcvsxwdp vs0, vs34
972 ; FAST-P9-NEXT: xssubdp f0, f0, f1
973 ; FAST-P9-NEXT: fsel f1, f0, f3, f2
976 ; NO-FAST-P8-LABEL: onecmp2:
977 ; NO-FAST-P8: # %bb.0: # %entry
978 ; NO-FAST-P8-NEXT: vspltisw v2, 1
979 ; NO-FAST-P8-NEXT: xvcvsxwdp vs0, vs34
980 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f0
981 ; NO-FAST-P8-NEXT: bgt cr0, .LBB25_2
982 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
983 ; NO-FAST-P8-NEXT: fmr f2, f3
984 ; NO-FAST-P8-NEXT: .LBB25_2: # %entry
985 ; NO-FAST-P8-NEXT: fmr f1, f2
986 ; NO-FAST-P8-NEXT: blr
988 ; NO-FAST-P9-LABEL: onecmp2:
989 ; NO-FAST-P9: # %bb.0: # %entry
990 ; NO-FAST-P9-NEXT: vspltisw v2, 1
991 ; NO-FAST-P9-NEXT: xvcvsxwdp vs0, vs34
992 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f0
993 ; NO-FAST-P9-NEXT: bgt cr0, .LBB25_2
994 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
995 ; NO-FAST-P9-NEXT: fmr f2, f3
996 ; NO-FAST-P9-NEXT: .LBB25_2: # %entry
997 ; NO-FAST-P9-NEXT: fmr f1, f2
998 ; NO-FAST-P9-NEXT: blr
1000 %cmp = fcmp ogt double %a, 1.000000e+00
1001 %y.z = select i1 %cmp, double %y, double %z
1005 define double @onecmp3(double %a, double %y, double %z) {
1006 ; FAST-P8-LABEL: onecmp3:
1007 ; FAST-P8: # %bb.0: # %entry
1008 ; FAST-P8-NEXT: vspltisw v2, -1
1009 ; FAST-P8-NEXT: xvcvsxwdp vs0, vs34
1010 ; FAST-P8-NEXT: xsadddp f0, f1, f0
1011 ; FAST-P8-NEXT: fsel f1, f0, f2, f3
1012 ; FAST-P8-NEXT: xsnegdp f0, f0
1013 ; FAST-P8-NEXT: fsel f1, f0, f1, f3
1016 ; FAST-P9-LABEL: onecmp3:
1017 ; FAST-P9: # %bb.0: # %entry
1018 ; FAST-P9-NEXT: vspltisw v2, -1
1019 ; FAST-P9-NEXT: xvcvsxwdp vs0, vs34
1020 ; FAST-P9-NEXT: xsadddp f0, f1, f0
1021 ; FAST-P9-NEXT: fsel f1, f0, f2, f3
1022 ; FAST-P9-NEXT: xsnegdp f0, f0
1023 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
1026 ; NO-FAST-P8-LABEL: onecmp3:
1027 ; NO-FAST-P8: # %bb.0: # %entry
1028 ; NO-FAST-P8-NEXT: vspltisw v2, 1
1029 ; NO-FAST-P8-NEXT: xvcvsxwdp vs0, vs34
1030 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f0
1031 ; NO-FAST-P8-NEXT: beq cr0, .LBB26_2
1032 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
1033 ; NO-FAST-P8-NEXT: fmr f2, f3
1034 ; NO-FAST-P8-NEXT: .LBB26_2: # %entry
1035 ; NO-FAST-P8-NEXT: fmr f1, f2
1036 ; NO-FAST-P8-NEXT: blr
1038 ; NO-FAST-P9-LABEL: onecmp3:
1039 ; NO-FAST-P9: # %bb.0: # %entry
1040 ; NO-FAST-P9-NEXT: vspltisw v2, 1
1041 ; NO-FAST-P9-NEXT: xvcvsxwdp vs0, vs34
1042 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f0
1043 ; NO-FAST-P9-NEXT: beq cr0, .LBB26_2
1044 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
1045 ; NO-FAST-P9-NEXT: fmr f2, f3
1046 ; NO-FAST-P9-NEXT: .LBB26_2: # %entry
1047 ; NO-FAST-P9-NEXT: fmr f1, f2
1048 ; NO-FAST-P9-NEXT: blr
1050 %cmp = fcmp oeq double %a, 1.000000e+00
1051 %y.z = select i1 %cmp, double %y, double %z