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, f1, f2
24 ; FAST-P8-NEXT: xssubsp f1, f2, f1
25 ; FAST-P8-NEXT: fsel f0, f0, f3, f4
26 ; FAST-P8-NEXT: fsel f1, f1, f0, 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: fmr f1, f3
41 ; NO-FAST-P8-NEXT: beqlr cr0
42 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
43 ; NO-FAST-P8-NEXT: fmr f1, f4
44 ; NO-FAST-P8-NEXT: blr
46 ; NO-FAST-P9-LABEL: select_oeq_float:
47 ; NO-FAST-P9: # %bb.0: # %entry
48 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
49 ; NO-FAST-P9-NEXT: beq cr0, .LBB0_2
50 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
51 ; NO-FAST-P9-NEXT: fmr f3, f4
52 ; NO-FAST-P9-NEXT: .LBB0_2: # %entry
53 ; NO-FAST-P9-NEXT: fmr f1, f3
54 ; NO-FAST-P9-NEXT: blr
56 %cmp = fcmp oeq float %a, %b
57 %cond = select i1 %cmp, float %c, float %d
61 define double @select_oeq_double(double %a, double %b, double %c, double %d) {
62 ; FAST-P8-LABEL: select_oeq_double:
63 ; FAST-P8: # %bb.0: # %entry
64 ; FAST-P8-NEXT: xssubdp f0, f1, f2
65 ; FAST-P8-NEXT: xsnegdp f1, f0
66 ; FAST-P8-NEXT: fsel f0, f0, f3, f4
67 ; FAST-P8-NEXT: fsel f1, f1, f0, f4
70 ; FAST-P9-LABEL: select_oeq_double:
71 ; FAST-P9: # %bb.0: # %entry
72 ; FAST-P9-NEXT: xssubdp f0, f1, f2
73 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
74 ; FAST-P9-NEXT: xsnegdp f0, f0
75 ; FAST-P9-NEXT: fsel f1, f0, f1, f4
78 ; NO-FAST-P8-LABEL: select_oeq_double:
79 ; NO-FAST-P8: # %bb.0: # %entry
80 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f2
81 ; NO-FAST-P8-NEXT: fmr f1, f3
82 ; NO-FAST-P8-NEXT: beqlr cr0
83 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
84 ; NO-FAST-P8-NEXT: fmr f1, f4
85 ; NO-FAST-P8-NEXT: blr
87 ; NO-FAST-P9-LABEL: select_oeq_double:
88 ; NO-FAST-P9: # %bb.0: # %entry
89 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f2
90 ; NO-FAST-P9-NEXT: beq cr0, .LBB1_2
91 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
92 ; NO-FAST-P9-NEXT: fmr f3, f4
93 ; NO-FAST-P9-NEXT: .LBB1_2: # %entry
94 ; NO-FAST-P9-NEXT: fmr f1, f3
95 ; NO-FAST-P9-NEXT: blr
97 %cmp = fcmp oeq double %a, %b
98 %cond = select i1 %cmp, double %c, double %d
102 define float @select_fast_oeq_float(float %a, float %b, float %c, float %d) {
103 ; FAST-P8-LABEL: select_fast_oeq_float:
104 ; FAST-P8: # %bb.0: # %entry
105 ; FAST-P8-NEXT: xssubsp f0, f1, f2
106 ; FAST-P8-NEXT: xssubsp f1, f2, f1
107 ; FAST-P8-NEXT: fsel f0, f0, f3, f4
108 ; FAST-P8-NEXT: fsel f1, f1, f0, f4
111 ; FAST-P9-LABEL: select_fast_oeq_float:
112 ; FAST-P9: # %bb.0: # %entry
113 ; FAST-P9-NEXT: xssubsp f0, f2, f1
114 ; FAST-P9-NEXT: xssubsp f1, f1, f2
115 ; FAST-P9-NEXT: fsel f1, f1, f3, f4
116 ; FAST-P9-NEXT: fsel f1, f0, f1, f4
119 ; NO-FAST-P8-LABEL: select_fast_oeq_float:
120 ; NO-FAST-P8: # %bb.0: # %entry
121 ; NO-FAST-P8-NEXT: xssubsp f0, f1, f2
122 ; NO-FAST-P8-NEXT: xssubsp f1, f2, f1
123 ; NO-FAST-P8-NEXT: fsel f0, f0, f3, f4
124 ; NO-FAST-P8-NEXT: fsel f1, f1, f0, f4
125 ; NO-FAST-P8-NEXT: blr
127 ; NO-FAST-P9-LABEL: select_fast_oeq_float:
128 ; NO-FAST-P9: # %bb.0: # %entry
129 ; NO-FAST-P9-NEXT: xssubsp f0, f2, f1
130 ; NO-FAST-P9-NEXT: xssubsp f1, f1, f2
131 ; NO-FAST-P9-NEXT: fsel f1, f1, f3, f4
132 ; NO-FAST-P9-NEXT: fsel f1, f0, f1, f4
133 ; NO-FAST-P9-NEXT: blr
135 %cmp = fcmp nnan ninf nsz oeq float %a, %b
136 %cond = select i1 %cmp, float %c, float %d
140 define double @select_fast_oeq_double(double %a, double %b, double %c, double %d) {
141 ; FAST-P8-LABEL: select_fast_oeq_double:
142 ; FAST-P8: # %bb.0: # %entry
143 ; FAST-P8-NEXT: xssubdp f0, f1, f2
144 ; FAST-P8-NEXT: xsnegdp f1, f0
145 ; FAST-P8-NEXT: fsel f0, f0, f3, f4
146 ; FAST-P8-NEXT: fsel f1, f1, f0, f4
149 ; FAST-P9-LABEL: select_fast_oeq_double:
150 ; FAST-P9: # %bb.0: # %entry
151 ; FAST-P9-NEXT: xssubdp f0, f1, f2
152 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
153 ; FAST-P9-NEXT: xsnegdp f0, f0
154 ; FAST-P9-NEXT: fsel f1, f0, f1, f4
157 ; NO-FAST-P8-LABEL: select_fast_oeq_double:
158 ; NO-FAST-P8: # %bb.0: # %entry
159 ; NO-FAST-P8-NEXT: xssubdp f0, f1, f2
160 ; NO-FAST-P8-NEXT: xsnegdp f1, f0
161 ; NO-FAST-P8-NEXT: fsel f0, f0, f3, f4
162 ; NO-FAST-P8-NEXT: fsel f1, f1, f0, f4
163 ; NO-FAST-P8-NEXT: blr
165 ; NO-FAST-P9-LABEL: select_fast_oeq_double:
166 ; NO-FAST-P9: # %bb.0: # %entry
167 ; NO-FAST-P9-NEXT: xssubdp f0, f1, f2
168 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
169 ; NO-FAST-P9-NEXT: xsnegdp f0, f0
170 ; NO-FAST-P9-NEXT: fsel f1, f0, f1, f4
171 ; NO-FAST-P9-NEXT: blr
173 %cmp = fcmp nnan ninf nsz oeq double %a, %b
174 %cond = select i1 %cmp, double %c, double %d
180 define float @select_one_float(float %a, float %b, float %c, float %d) {
181 ; FAST-P8-LABEL: select_one_float:
182 ; FAST-P8: # %bb.0: # %entry
183 ; FAST-P8-NEXT: xssubsp f0, f1, f2
184 ; FAST-P8-NEXT: xssubsp f1, f2, f1
185 ; FAST-P8-NEXT: fsel f0, f0, f4, f3
186 ; FAST-P8-NEXT: fsel f1, f1, f0, f3
189 ; FAST-P9-LABEL: select_one_float:
190 ; FAST-P9: # %bb.0: # %entry
191 ; FAST-P9-NEXT: xssubsp f0, f2, f1
192 ; FAST-P9-NEXT: xssubsp f1, f1, f2
193 ; FAST-P9-NEXT: fsel f1, f1, f4, f3
194 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
197 ; NO-FAST-P8-LABEL: select_one_float:
198 ; NO-FAST-P8: # %bb.0: # %entry
199 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
200 ; NO-FAST-P8-NEXT: fmr f1, f3
201 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, eq
202 ; NO-FAST-P8-NEXT: bclr 12, 4*cr5+lt, 0
203 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
204 ; NO-FAST-P8-NEXT: fmr f1, f4
205 ; NO-FAST-P8-NEXT: blr
207 ; NO-FAST-P9-LABEL: select_one_float:
208 ; NO-FAST-P9: # %bb.0: # %entry
209 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
210 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, eq
211 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB4_2
212 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
213 ; NO-FAST-P9-NEXT: fmr f3, f4
214 ; NO-FAST-P9-NEXT: .LBB4_2: # %entry
215 ; NO-FAST-P9-NEXT: fmr f1, f3
216 ; NO-FAST-P9-NEXT: blr
218 %cmp = fcmp one float %a, %b
219 %cond = select i1 %cmp, float %c, float %d
223 define double @select_one_double(double %a, double %b, double %c, double %d) {
224 ; FAST-P8-LABEL: select_one_double:
225 ; FAST-P8: # %bb.0: # %entry
226 ; FAST-P8-NEXT: xssubdp f0, f1, f2
227 ; FAST-P8-NEXT: xsnegdp f1, f0
228 ; FAST-P8-NEXT: fsel f0, f0, f4, f3
229 ; FAST-P8-NEXT: fsel f1, f1, f0, f3
232 ; FAST-P9-LABEL: select_one_double:
233 ; FAST-P9: # %bb.0: # %entry
234 ; FAST-P9-NEXT: xssubdp f0, f1, f2
235 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
236 ; FAST-P9-NEXT: xsnegdp f0, f0
237 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
240 ; NO-FAST-P8-LABEL: select_one_double:
241 ; NO-FAST-P8: # %bb.0: # %entry
242 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
243 ; NO-FAST-P8-NEXT: fmr f1, f3
244 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, eq
245 ; NO-FAST-P8-NEXT: bclr 12, 4*cr5+lt, 0
246 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
247 ; NO-FAST-P8-NEXT: fmr f1, f4
248 ; NO-FAST-P8-NEXT: blr
250 ; NO-FAST-P9-LABEL: select_one_double:
251 ; NO-FAST-P9: # %bb.0: # %entry
252 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
253 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, eq
254 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB5_2
255 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
256 ; NO-FAST-P9-NEXT: fmr f3, f4
257 ; NO-FAST-P9-NEXT: .LBB5_2: # %entry
258 ; NO-FAST-P9-NEXT: fmr f1, f3
259 ; NO-FAST-P9-NEXT: blr
261 %cmp = fcmp one double %a, %b
262 %cond = select i1 %cmp, double %c, double %d
266 define float @select_fast_one_float(float %a, float %b, float %c, float %d) {
267 ; FAST-P8-LABEL: select_fast_one_float:
268 ; FAST-P8: # %bb.0: # %entry
269 ; FAST-P8-NEXT: xssubsp f0, f1, f2
270 ; FAST-P8-NEXT: xssubsp f1, f2, f1
271 ; FAST-P8-NEXT: fsel f0, f0, f4, f3
272 ; FAST-P8-NEXT: fsel f1, f1, f0, f3
275 ; FAST-P9-LABEL: select_fast_one_float:
276 ; FAST-P9: # %bb.0: # %entry
277 ; FAST-P9-NEXT: xssubsp f0, f2, f1
278 ; FAST-P9-NEXT: xssubsp f1, f1, f2
279 ; FAST-P9-NEXT: fsel f1, f1, f4, f3
280 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
283 ; NO-FAST-P8-LABEL: select_fast_one_float:
284 ; NO-FAST-P8: # %bb.0: # %entry
285 ; NO-FAST-P8-NEXT: xssubsp f0, f1, f2
286 ; NO-FAST-P8-NEXT: xssubsp f1, f2, f1
287 ; NO-FAST-P8-NEXT: fsel f0, f0, f4, f3
288 ; NO-FAST-P8-NEXT: fsel f1, f1, f0, f3
289 ; NO-FAST-P8-NEXT: blr
291 ; NO-FAST-P9-LABEL: select_fast_one_float:
292 ; NO-FAST-P9: # %bb.0: # %entry
293 ; NO-FAST-P9-NEXT: xssubsp f0, f2, f1
294 ; NO-FAST-P9-NEXT: xssubsp f1, f1, f2
295 ; NO-FAST-P9-NEXT: fsel f1, f1, f4, f3
296 ; NO-FAST-P9-NEXT: fsel f1, f0, f1, f3
297 ; NO-FAST-P9-NEXT: blr
299 %cmp = fcmp nnan ninf nsz one float %a, %b
300 %cond = select i1 %cmp, float %c, float %d
304 define double @select_fast_one_double(double %a, double %b, double %c, double %d) {
305 ; FAST-P8-LABEL: select_fast_one_double:
306 ; FAST-P8: # %bb.0: # %entry
307 ; FAST-P8-NEXT: xssubdp f0, f1, f2
308 ; FAST-P8-NEXT: xsnegdp f1, f0
309 ; FAST-P8-NEXT: fsel f0, f0, f4, f3
310 ; FAST-P8-NEXT: fsel f1, f1, f0, f3
313 ; FAST-P9-LABEL: select_fast_one_double:
314 ; FAST-P9: # %bb.0: # %entry
315 ; FAST-P9-NEXT: xssubdp f0, f1, f2
316 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
317 ; FAST-P9-NEXT: xsnegdp f0, f0
318 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
321 ; NO-FAST-P8-LABEL: select_fast_one_double:
322 ; NO-FAST-P8: # %bb.0: # %entry
323 ; NO-FAST-P8-NEXT: xssubdp f0, f1, f2
324 ; NO-FAST-P8-NEXT: xsnegdp f1, f0
325 ; NO-FAST-P8-NEXT: fsel f0, f0, f4, f3
326 ; NO-FAST-P8-NEXT: fsel f1, f1, f0, f3
327 ; NO-FAST-P8-NEXT: blr
329 ; NO-FAST-P9-LABEL: select_fast_one_double:
330 ; NO-FAST-P9: # %bb.0: # %entry
331 ; NO-FAST-P9-NEXT: xssubdp f0, f1, f2
332 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
333 ; NO-FAST-P9-NEXT: xsnegdp f0, f0
334 ; NO-FAST-P9-NEXT: fsel f1, f0, f1, f3
335 ; NO-FAST-P9-NEXT: blr
337 %cmp = fcmp nnan ninf nsz one double %a, %b
338 %cond = select i1 %cmp, double %c, double %d
344 define float @select_oge_float(float %a, float %b, float %c, float %d) {
345 ; FAST-P8-LABEL: select_oge_float:
346 ; FAST-P8: # %bb.0: # %entry
347 ; FAST-P8-NEXT: xssubsp f0, f1, f2
348 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
351 ; FAST-P9-LABEL: select_oge_float:
352 ; FAST-P9: # %bb.0: # %entry
353 ; FAST-P9-NEXT: xssubsp f0, f1, f2
354 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
357 ; NO-FAST-P8-LABEL: select_oge_float:
358 ; NO-FAST-P8: # %bb.0: # %entry
359 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
360 ; NO-FAST-P8-NEXT: fmr f1, f3
361 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, lt
362 ; NO-FAST-P8-NEXT: bclr 12, 4*cr5+lt, 0
363 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
364 ; NO-FAST-P8-NEXT: fmr f1, f4
365 ; NO-FAST-P8-NEXT: blr
367 ; NO-FAST-P9-LABEL: select_oge_float:
368 ; NO-FAST-P9: # %bb.0: # %entry
369 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
370 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, lt
371 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB8_2
372 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
373 ; NO-FAST-P9-NEXT: fmr f3, f4
374 ; NO-FAST-P9-NEXT: .LBB8_2: # %entry
375 ; NO-FAST-P9-NEXT: fmr f1, f3
376 ; NO-FAST-P9-NEXT: blr
378 %cmp = fcmp oge float %a, %b
379 %cond = select i1 %cmp, float %c, float %d
383 define double @select_oge_double(double %a, double %b, double %c, double %d) {
384 ; FAST-P8-LABEL: select_oge_double:
385 ; FAST-P8: # %bb.0: # %entry
386 ; FAST-P8-NEXT: xssubdp f0, f1, f2
387 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
390 ; FAST-P9-LABEL: select_oge_double:
391 ; FAST-P9: # %bb.0: # %entry
392 ; FAST-P9-NEXT: xssubdp f0, f1, f2
393 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
396 ; NO-FAST-P8-LABEL: select_oge_double:
397 ; NO-FAST-P8: # %bb.0: # %entry
398 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
399 ; NO-FAST-P8-NEXT: fmr f1, f3
400 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, lt
401 ; NO-FAST-P8-NEXT: bclr 12, 4*cr5+lt, 0
402 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
403 ; NO-FAST-P8-NEXT: fmr f1, f4
404 ; NO-FAST-P8-NEXT: blr
406 ; NO-FAST-P9-LABEL: select_oge_double:
407 ; NO-FAST-P9: # %bb.0: # %entry
408 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
409 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, lt
410 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB9_2
411 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
412 ; NO-FAST-P9-NEXT: fmr f3, f4
413 ; NO-FAST-P9-NEXT: .LBB9_2: # %entry
414 ; NO-FAST-P9-NEXT: fmr f1, f3
415 ; NO-FAST-P9-NEXT: blr
417 %cmp = fcmp oge double %a, %b
418 %cond = select i1 %cmp, double %c, double %d
422 define float @select_fast_oge_float(float %a, float %b, float %c, float %d) {
423 ; FAST-P8-LABEL: select_fast_oge_float:
424 ; FAST-P8: # %bb.0: # %entry
425 ; FAST-P8-NEXT: xssubsp f0, f1, f2
426 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
429 ; FAST-P9-LABEL: select_fast_oge_float:
430 ; FAST-P9: # %bb.0: # %entry
431 ; FAST-P9-NEXT: xssubsp f0, f1, f2
432 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
435 ; NO-FAST-P8-LABEL: select_fast_oge_float:
436 ; NO-FAST-P8: # %bb.0: # %entry
437 ; NO-FAST-P8-NEXT: xssubsp f0, f1, f2
438 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
439 ; NO-FAST-P8-NEXT: blr
441 ; NO-FAST-P9-LABEL: select_fast_oge_float:
442 ; NO-FAST-P9: # %bb.0: # %entry
443 ; NO-FAST-P9-NEXT: xssubsp f0, f1, f2
444 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
445 ; NO-FAST-P9-NEXT: blr
447 %cmp = fcmp nnan ninf nsz oge float %a, %b
448 %cond = select i1 %cmp, float %c, float %d
452 define double @select_fast_oge_double(double %a, double %b, double %c, double %d) {
453 ; FAST-P8-LABEL: select_fast_oge_double:
454 ; FAST-P8: # %bb.0: # %entry
455 ; FAST-P8-NEXT: xssubdp f0, f1, f2
456 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
459 ; FAST-P9-LABEL: select_fast_oge_double:
460 ; FAST-P9: # %bb.0: # %entry
461 ; FAST-P9-NEXT: xssubdp f0, f1, f2
462 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
465 ; NO-FAST-P8-LABEL: select_fast_oge_double:
466 ; NO-FAST-P8: # %bb.0: # %entry
467 ; NO-FAST-P8-NEXT: xssubdp f0, f1, f2
468 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
469 ; NO-FAST-P8-NEXT: blr
471 ; NO-FAST-P9-LABEL: select_fast_oge_double:
472 ; NO-FAST-P9: # %bb.0: # %entry
473 ; NO-FAST-P9-NEXT: xssubdp f0, f1, f2
474 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
475 ; NO-FAST-P9-NEXT: blr
477 %cmp = fcmp nnan ninf nsz oge double %a, %b
478 %cond = select i1 %cmp, double %c, double %d
484 define float @select_olt_float(float %a, float %b, float %c, float %d) {
485 ; FAST-P8-LABEL: select_olt_float:
486 ; FAST-P8: # %bb.0: # %entry
487 ; FAST-P8-NEXT: xssubsp f0, f1, f2
488 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
491 ; FAST-P9-LABEL: select_olt_float:
492 ; FAST-P9: # %bb.0: # %entry
493 ; FAST-P9-NEXT: xssubsp f0, f1, f2
494 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
497 ; NO-FAST-P8-LABEL: select_olt_float:
498 ; NO-FAST-P8: # %bb.0: # %entry
499 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
500 ; NO-FAST-P8-NEXT: fmr f1, f3
501 ; NO-FAST-P8-NEXT: bltlr cr0
502 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
503 ; NO-FAST-P8-NEXT: fmr f1, f4
504 ; NO-FAST-P8-NEXT: blr
506 ; NO-FAST-P9-LABEL: select_olt_float:
507 ; NO-FAST-P9: # %bb.0: # %entry
508 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
509 ; NO-FAST-P9-NEXT: blt cr0, .LBB12_2
510 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
511 ; NO-FAST-P9-NEXT: fmr f3, f4
512 ; NO-FAST-P9-NEXT: .LBB12_2: # %entry
513 ; NO-FAST-P9-NEXT: fmr f1, f3
514 ; NO-FAST-P9-NEXT: blr
516 %cmp = fcmp olt float %a, %b
517 %cond = select i1 %cmp, float %c, float %d
521 define double @select_olt_double(double %a, double %b, double %c, double %d) {
522 ; FAST-P8-LABEL: select_olt_double:
523 ; FAST-P8: # %bb.0: # %entry
524 ; FAST-P8-NEXT: xssubdp f0, f1, f2
525 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
528 ; FAST-P9-LABEL: select_olt_double:
529 ; FAST-P9: # %bb.0: # %entry
530 ; FAST-P9-NEXT: xssubdp f0, f1, f2
531 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
534 ; NO-FAST-P8-LABEL: select_olt_double:
535 ; NO-FAST-P8: # %bb.0: # %entry
536 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f2
537 ; NO-FAST-P8-NEXT: fmr f1, f3
538 ; NO-FAST-P8-NEXT: bltlr cr0
539 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
540 ; NO-FAST-P8-NEXT: fmr f1, f4
541 ; NO-FAST-P8-NEXT: blr
543 ; NO-FAST-P9-LABEL: select_olt_double:
544 ; NO-FAST-P9: # %bb.0: # %entry
545 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f2
546 ; NO-FAST-P9-NEXT: blt cr0, .LBB13_2
547 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
548 ; NO-FAST-P9-NEXT: fmr f3, f4
549 ; NO-FAST-P9-NEXT: .LBB13_2: # %entry
550 ; NO-FAST-P9-NEXT: fmr f1, f3
551 ; NO-FAST-P9-NEXT: blr
553 %cmp = fcmp olt double %a, %b
554 %cond = select i1 %cmp, double %c, double %d
558 define float @select_fast_olt_float(float %a, float %b, float %c, float %d) {
559 ; FAST-P8-LABEL: select_fast_olt_float:
560 ; FAST-P8: # %bb.0: # %entry
561 ; FAST-P8-NEXT: xssubsp f0, f1, f2
562 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
565 ; FAST-P9-LABEL: select_fast_olt_float:
566 ; FAST-P9: # %bb.0: # %entry
567 ; FAST-P9-NEXT: xssubsp f0, f1, f2
568 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
571 ; NO-FAST-P8-LABEL: select_fast_olt_float:
572 ; NO-FAST-P8: # %bb.0: # %entry
573 ; NO-FAST-P8-NEXT: xssubsp f0, f1, f2
574 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
575 ; NO-FAST-P8-NEXT: blr
577 ; NO-FAST-P9-LABEL: select_fast_olt_float:
578 ; NO-FAST-P9: # %bb.0: # %entry
579 ; NO-FAST-P9-NEXT: xssubsp f0, f1, f2
580 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
581 ; NO-FAST-P9-NEXT: blr
583 %cmp = fcmp ninf nnan nsz olt float %a, %b
584 %cond = select i1 %cmp, float %c, float %d
588 define double @select_fast_olt_double(double %a, double %b, double %c, double %d) {
589 ; FAST-P8-LABEL: select_fast_olt_double:
590 ; FAST-P8: # %bb.0: # %entry
591 ; FAST-P8-NEXT: xssubdp f0, f1, f2
592 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
595 ; FAST-P9-LABEL: select_fast_olt_double:
596 ; FAST-P9: # %bb.0: # %entry
597 ; FAST-P9-NEXT: xssubdp f0, f1, f2
598 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
601 ; NO-FAST-P8-LABEL: select_fast_olt_double:
602 ; NO-FAST-P8: # %bb.0: # %entry
603 ; NO-FAST-P8-NEXT: xssubdp f0, f1, f2
604 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
605 ; NO-FAST-P8-NEXT: blr
607 ; NO-FAST-P9-LABEL: select_fast_olt_double:
608 ; NO-FAST-P9: # %bb.0: # %entry
609 ; NO-FAST-P9-NEXT: xssubdp f0, f1, f2
610 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
611 ; NO-FAST-P9-NEXT: blr
613 %cmp = fcmp nnan ninf nsz olt double %a, %b
614 %cond = select i1 %cmp, double %c, double %d
620 define float @select_ogt_float(float %a, float %b, float %c, float %d) {
621 ; FAST-P8-LABEL: select_ogt_float:
622 ; FAST-P8: # %bb.0: # %entry
623 ; FAST-P8-NEXT: xssubsp f0, f2, f1
624 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
627 ; FAST-P9-LABEL: select_ogt_float:
628 ; FAST-P9: # %bb.0: # %entry
629 ; FAST-P9-NEXT: xssubsp f0, f2, f1
630 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
633 ; NO-FAST-P8-LABEL: select_ogt_float:
634 ; NO-FAST-P8: # %bb.0: # %entry
635 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
636 ; NO-FAST-P8-NEXT: fmr f1, f3
637 ; NO-FAST-P8-NEXT: bgtlr cr0
638 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
639 ; NO-FAST-P8-NEXT: fmr f1, f4
640 ; NO-FAST-P8-NEXT: blr
642 ; NO-FAST-P9-LABEL: select_ogt_float:
643 ; NO-FAST-P9: # %bb.0: # %entry
644 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
645 ; NO-FAST-P9-NEXT: bgt cr0, .LBB16_2
646 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
647 ; NO-FAST-P9-NEXT: fmr f3, f4
648 ; NO-FAST-P9-NEXT: .LBB16_2: # %entry
649 ; NO-FAST-P9-NEXT: fmr f1, f3
650 ; NO-FAST-P9-NEXT: blr
652 %cmp = fcmp ogt float %a, %b
653 %cond = select i1 %cmp, float %c, float %d
657 define double @select_ogt_double(double %a, double %b, double %c, double %d) {
658 ; FAST-P8-LABEL: select_ogt_double:
659 ; FAST-P8: # %bb.0: # %entry
660 ; FAST-P8-NEXT: xssubdp f0, f2, f1
661 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
664 ; FAST-P9-LABEL: select_ogt_double:
665 ; FAST-P9: # %bb.0: # %entry
666 ; FAST-P9-NEXT: xssubdp f0, f2, f1
667 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
670 ; NO-FAST-P8-LABEL: select_ogt_double:
671 ; NO-FAST-P8: # %bb.0: # %entry
672 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f2
673 ; NO-FAST-P8-NEXT: fmr f1, f3
674 ; NO-FAST-P8-NEXT: bgtlr cr0
675 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
676 ; NO-FAST-P8-NEXT: fmr f1, f4
677 ; NO-FAST-P8-NEXT: blr
679 ; NO-FAST-P9-LABEL: select_ogt_double:
680 ; NO-FAST-P9: # %bb.0: # %entry
681 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f2
682 ; NO-FAST-P9-NEXT: bgt cr0, .LBB17_2
683 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
684 ; NO-FAST-P9-NEXT: fmr f3, f4
685 ; NO-FAST-P9-NEXT: .LBB17_2: # %entry
686 ; NO-FAST-P9-NEXT: fmr f1, f3
687 ; NO-FAST-P9-NEXT: blr
689 %cmp = fcmp ogt double %a, %b
690 %cond = select i1 %cmp, double %c, double %d
694 define float @select_fast_ogt_float(float %a, float %b, float %c, float %d) {
695 ; FAST-P8-LABEL: select_fast_ogt_float:
696 ; FAST-P8: # %bb.0: # %entry
697 ; FAST-P8-NEXT: xssubsp f0, f2, f1
698 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
701 ; FAST-P9-LABEL: select_fast_ogt_float:
702 ; FAST-P9: # %bb.0: # %entry
703 ; FAST-P9-NEXT: xssubsp f0, f2, f1
704 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
707 ; NO-FAST-P8-LABEL: select_fast_ogt_float:
708 ; NO-FAST-P8: # %bb.0: # %entry
709 ; NO-FAST-P8-NEXT: xssubsp f0, f2, f1
710 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
711 ; NO-FAST-P8-NEXT: blr
713 ; NO-FAST-P9-LABEL: select_fast_ogt_float:
714 ; NO-FAST-P9: # %bb.0: # %entry
715 ; NO-FAST-P9-NEXT: xssubsp f0, f2, f1
716 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
717 ; NO-FAST-P9-NEXT: blr
719 %cmp = fcmp nnan ninf nsz ogt float %a, %b
720 %cond = select i1 %cmp, float %c, float %d
724 define double @select_fast_ogt_double(double %a, double %b, double %c, double %d) {
725 ; FAST-P8-LABEL: select_fast_ogt_double:
726 ; FAST-P8: # %bb.0: # %entry
727 ; FAST-P8-NEXT: xssubdp f0, f2, f1
728 ; FAST-P8-NEXT: fsel f1, f0, f4, f3
731 ; FAST-P9-LABEL: select_fast_ogt_double:
732 ; FAST-P9: # %bb.0: # %entry
733 ; FAST-P9-NEXT: xssubdp f0, f2, f1
734 ; FAST-P9-NEXT: fsel f1, f0, f4, f3
737 ; NO-FAST-P8-LABEL: select_fast_ogt_double:
738 ; NO-FAST-P8: # %bb.0: # %entry
739 ; NO-FAST-P8-NEXT: xssubdp f0, f2, f1
740 ; NO-FAST-P8-NEXT: fsel f1, f0, f4, f3
741 ; NO-FAST-P8-NEXT: blr
743 ; NO-FAST-P9-LABEL: select_fast_ogt_double:
744 ; NO-FAST-P9: # %bb.0: # %entry
745 ; NO-FAST-P9-NEXT: xssubdp f0, f2, f1
746 ; NO-FAST-P9-NEXT: fsel f1, f0, f4, f3
747 ; NO-FAST-P9-NEXT: blr
749 %cmp = fcmp nnan ninf nsz ogt double %a, %b
750 %cond = select i1 %cmp, double %c, double %d
756 define float @select_ole_float(float %a, float %b, float %c, float %d) {
757 ; FAST-P8-LABEL: select_ole_float:
758 ; FAST-P8: # %bb.0: # %entry
759 ; FAST-P8-NEXT: xssubsp f0, f2, f1
760 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
763 ; FAST-P9-LABEL: select_ole_float:
764 ; FAST-P9: # %bb.0: # %entry
765 ; FAST-P9-NEXT: xssubsp f0, f2, f1
766 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
769 ; NO-FAST-P8-LABEL: select_ole_float:
770 ; NO-FAST-P8: # %bb.0: # %entry
771 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
772 ; NO-FAST-P8-NEXT: fmr f1, f3
773 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, gt
774 ; NO-FAST-P8-NEXT: bclr 12, 4*cr5+lt, 0
775 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
776 ; NO-FAST-P8-NEXT: fmr f1, f4
777 ; NO-FAST-P8-NEXT: blr
779 ; NO-FAST-P9-LABEL: select_ole_float:
780 ; NO-FAST-P9: # %bb.0: # %entry
781 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
782 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, gt
783 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB20_2
784 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
785 ; NO-FAST-P9-NEXT: fmr f3, f4
786 ; NO-FAST-P9-NEXT: .LBB20_2: # %entry
787 ; NO-FAST-P9-NEXT: fmr f1, f3
788 ; NO-FAST-P9-NEXT: blr
790 %cmp = fcmp ole float %a, %b
791 %cond = select i1 %cmp, float %c, float %d
795 define double @select_ole_double(double %a, double %b, double %c, double %d) {
796 ; FAST-P8-LABEL: select_ole_double:
797 ; FAST-P8: # %bb.0: # %entry
798 ; FAST-P8-NEXT: xssubdp f0, f2, f1
799 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
802 ; FAST-P9-LABEL: select_ole_double:
803 ; FAST-P9: # %bb.0: # %entry
804 ; FAST-P9-NEXT: xssubdp f0, f2, f1
805 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
808 ; NO-FAST-P8-LABEL: select_ole_double:
809 ; NO-FAST-P8: # %bb.0: # %entry
810 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f2
811 ; NO-FAST-P8-NEXT: fmr f1, f3
812 ; NO-FAST-P8-NEXT: crnor 4*cr5+lt, un, gt
813 ; NO-FAST-P8-NEXT: bclr 12, 4*cr5+lt, 0
814 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
815 ; NO-FAST-P8-NEXT: fmr f1, f4
816 ; NO-FAST-P8-NEXT: blr
818 ; NO-FAST-P9-LABEL: select_ole_double:
819 ; NO-FAST-P9: # %bb.0: # %entry
820 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f2
821 ; NO-FAST-P9-NEXT: crnor 4*cr5+lt, un, gt
822 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB21_2
823 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
824 ; NO-FAST-P9-NEXT: fmr f3, f4
825 ; NO-FAST-P9-NEXT: .LBB21_2: # %entry
826 ; NO-FAST-P9-NEXT: fmr f1, f3
827 ; NO-FAST-P9-NEXT: blr
829 %cmp = fcmp ole double %a, %b
830 %cond = select i1 %cmp, double %c, double %d
834 define float @select_fast_ole_float(float %a, float %b, float %c, float %d) {
835 ; FAST-P8-LABEL: select_fast_ole_float:
836 ; FAST-P8: # %bb.0: # %entry
837 ; FAST-P8-NEXT: xssubsp f0, f2, f1
838 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
841 ; FAST-P9-LABEL: select_fast_ole_float:
842 ; FAST-P9: # %bb.0: # %entry
843 ; FAST-P9-NEXT: xssubsp f0, f2, f1
844 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
847 ; NO-FAST-P8-LABEL: select_fast_ole_float:
848 ; NO-FAST-P8: # %bb.0: # %entry
849 ; NO-FAST-P8-NEXT: xssubsp f0, f2, f1
850 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
851 ; NO-FAST-P8-NEXT: blr
853 ; NO-FAST-P9-LABEL: select_fast_ole_float:
854 ; NO-FAST-P9: # %bb.0: # %entry
855 ; NO-FAST-P9-NEXT: xssubsp f0, f2, f1
856 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
857 ; NO-FAST-P9-NEXT: blr
859 %cmp = fcmp nnan ninf nsz ole float %a, %b
860 %cond = select i1 %cmp, float %c, float %d
864 define double @select_fast_ole_double(double %a, double %b, double %c, double %d) {
865 ; FAST-P8-LABEL: select_fast_ole_double:
866 ; FAST-P8: # %bb.0: # %entry
867 ; FAST-P8-NEXT: xssubdp f0, f2, f1
868 ; FAST-P8-NEXT: fsel f1, f0, f3, f4
871 ; FAST-P9-LABEL: select_fast_ole_double:
872 ; FAST-P9: # %bb.0: # %entry
873 ; FAST-P9-NEXT: xssubdp f0, f2, f1
874 ; FAST-P9-NEXT: fsel f1, f0, f3, f4
877 ; NO-FAST-P8-LABEL: select_fast_ole_double:
878 ; NO-FAST-P8: # %bb.0: # %entry
879 ; NO-FAST-P8-NEXT: xssubdp f0, f2, f1
880 ; NO-FAST-P8-NEXT: fsel f1, f0, f3, f4
881 ; NO-FAST-P8-NEXT: blr
883 ; NO-FAST-P9-LABEL: select_fast_ole_double:
884 ; NO-FAST-P9: # %bb.0: # %entry
885 ; NO-FAST-P9-NEXT: xssubdp f0, f2, f1
886 ; NO-FAST-P9-NEXT: fsel f1, f0, f3, f4
887 ; NO-FAST-P9-NEXT: blr
889 %cmp = fcmp nnan ninf nsz ole double %a, %b
890 %cond = select i1 %cmp, double %c, double %d
894 ; Test RHS is 1.000000e+00
895 define double @onecmp1(double %a, double %y, double %z) {
896 ; FAST-P8-LABEL: onecmp1:
897 ; FAST-P8: # %bb.0: # %entry
898 ; FAST-P8-NEXT: addis r3, r2, .LCPI24_0@toc@ha
899 ; FAST-P8-NEXT: lfs f0, .LCPI24_0@toc@l(r3)
900 ; FAST-P8-NEXT: xssubdp f0, f1, f0
901 ; FAST-P8-NEXT: fsel f1, f0, f2, f3
904 ; FAST-P9-LABEL: onecmp1:
905 ; FAST-P9: # %bb.0: # %entry
906 ; FAST-P9-NEXT: addis r3, r2, .LCPI24_0@toc@ha
907 ; FAST-P9-NEXT: lfs f0, .LCPI24_0@toc@l(r3)
908 ; FAST-P9-NEXT: xssubdp f0, f1, f0
909 ; FAST-P9-NEXT: fsel f1, f0, f2, f3
912 ; NO-FAST-P8-LABEL: onecmp1:
913 ; NO-FAST-P8: # %bb.0: # %entry
914 ; NO-FAST-P8-NEXT: addis r3, r2, .LCPI24_0@toc@ha
915 ; NO-FAST-P8-NEXT: lfs f0, .LCPI24_0@toc@l(r3)
916 ; NO-FAST-P8-NEXT: fcmpu cr0, f1, f0
917 ; NO-FAST-P8-NEXT: cror 4*cr5+lt, lt, un
918 ; NO-FAST-P8-NEXT: bc 12, 4*cr5+lt, .LBB24_2
919 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
920 ; NO-FAST-P8-NEXT: fmr f3, f2
921 ; NO-FAST-P8-NEXT: .LBB24_2: # %entry
922 ; NO-FAST-P8-NEXT: fmr f1, f3
923 ; NO-FAST-P8-NEXT: blr
925 ; NO-FAST-P9-LABEL: onecmp1:
926 ; NO-FAST-P9: # %bb.0: # %entry
927 ; NO-FAST-P9-NEXT: addis r3, r2, .LCPI24_0@toc@ha
928 ; NO-FAST-P9-NEXT: lfs f0, .LCPI24_0@toc@l(r3)
929 ; NO-FAST-P9-NEXT: fcmpu cr0, f1, f0
930 ; NO-FAST-P9-NEXT: cror 4*cr5+lt, lt, un
931 ; NO-FAST-P9-NEXT: bc 12, 4*cr5+lt, .LBB24_2
932 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
933 ; NO-FAST-P9-NEXT: fmr f3, f2
934 ; NO-FAST-P9-NEXT: .LBB24_2: # %entry
935 ; NO-FAST-P9-NEXT: fmr f1, f3
936 ; NO-FAST-P9-NEXT: blr
938 %cmp = fcmp ult double %a, 1.000000e+00
939 %z.y = select i1 %cmp, double %z, double %y
943 define double @onecmp2(double %a, double %y, double %z) {
944 ; FAST-P8-LABEL: onecmp2:
945 ; FAST-P8: # %bb.0: # %entry
946 ; FAST-P8-NEXT: addis r3, r2, .LCPI25_0@toc@ha
947 ; FAST-P8-NEXT: lfs f0, .LCPI25_0@toc@l(r3)
948 ; FAST-P8-NEXT: xssubdp f0, f0, f1
949 ; FAST-P8-NEXT: fsel f1, f0, f3, f2
952 ; FAST-P9-LABEL: onecmp2:
953 ; FAST-P9: # %bb.0: # %entry
954 ; FAST-P9-NEXT: addis r3, r2, .LCPI25_0@toc@ha
955 ; FAST-P9-NEXT: lfs f0, .LCPI25_0@toc@l(r3)
956 ; FAST-P9-NEXT: xssubdp f0, f0, f1
957 ; FAST-P9-NEXT: fsel f1, f0, f3, f2
960 ; NO-FAST-P8-LABEL: onecmp2:
961 ; NO-FAST-P8: # %bb.0: # %entry
962 ; NO-FAST-P8-NEXT: addis r3, r2, .LCPI25_0@toc@ha
963 ; NO-FAST-P8-NEXT: lfs f0, .LCPI25_0@toc@l(r3)
964 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f0
965 ; NO-FAST-P8-NEXT: fmr f1, f2
966 ; NO-FAST-P8-NEXT: bgtlr cr0
967 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
968 ; NO-FAST-P8-NEXT: fmr f1, f3
969 ; NO-FAST-P8-NEXT: blr
971 ; NO-FAST-P9-LABEL: onecmp2:
972 ; NO-FAST-P9: # %bb.0: # %entry
973 ; NO-FAST-P9-NEXT: addis r3, r2, .LCPI25_0@toc@ha
974 ; NO-FAST-P9-NEXT: lfs f0, .LCPI25_0@toc@l(r3)
975 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f0
976 ; NO-FAST-P9-NEXT: bgt cr0, .LBB25_2
977 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
978 ; NO-FAST-P9-NEXT: fmr f2, f3
979 ; NO-FAST-P9-NEXT: .LBB25_2: # %entry
980 ; NO-FAST-P9-NEXT: fmr f1, f2
981 ; NO-FAST-P9-NEXT: blr
983 %cmp = fcmp ogt double %a, 1.000000e+00
984 %y.z = select i1 %cmp, double %y, double %z
988 define double @onecmp3(double %a, double %y, double %z) {
989 ; FAST-P8-LABEL: onecmp3:
990 ; FAST-P8: # %bb.0: # %entry
991 ; FAST-P8-NEXT: addis r3, r2, .LCPI26_0@toc@ha
992 ; FAST-P8-NEXT: lfs f0, .LCPI26_0@toc@l(r3)
993 ; FAST-P8-NEXT: xssubdp f0, f1, f0
994 ; FAST-P8-NEXT: xsnegdp f1, f0
995 ; FAST-P8-NEXT: fsel f0, f0, f2, f3
996 ; FAST-P8-NEXT: fsel f1, f1, f0, f3
999 ; FAST-P9-LABEL: onecmp3:
1000 ; FAST-P9: # %bb.0: # %entry
1001 ; FAST-P9-NEXT: addis r3, r2, .LCPI26_0@toc@ha
1002 ; FAST-P9-NEXT: lfs f0, .LCPI26_0@toc@l(r3)
1003 ; FAST-P9-NEXT: xssubdp f0, f1, f0
1004 ; FAST-P9-NEXT: fsel f1, f0, f2, f3
1005 ; FAST-P9-NEXT: xsnegdp f0, f0
1006 ; FAST-P9-NEXT: fsel f1, f0, f1, f3
1009 ; NO-FAST-P8-LABEL: onecmp3:
1010 ; NO-FAST-P8: # %bb.0: # %entry
1011 ; NO-FAST-P8-NEXT: addis r3, r2, .LCPI26_0@toc@ha
1012 ; NO-FAST-P8-NEXT: lfs f0, .LCPI26_0@toc@l(r3)
1013 ; NO-FAST-P8-NEXT: xscmpudp cr0, f1, f0
1014 ; NO-FAST-P8-NEXT: fmr f1, f2
1015 ; NO-FAST-P8-NEXT: beqlr cr0
1016 ; NO-FAST-P8-NEXT: # %bb.1: # %entry
1017 ; NO-FAST-P8-NEXT: fmr f1, f3
1018 ; NO-FAST-P8-NEXT: blr
1020 ; NO-FAST-P9-LABEL: onecmp3:
1021 ; NO-FAST-P9: # %bb.0: # %entry
1022 ; NO-FAST-P9-NEXT: addis r3, r2, .LCPI26_0@toc@ha
1023 ; NO-FAST-P9-NEXT: lfs f0, .LCPI26_0@toc@l(r3)
1024 ; NO-FAST-P9-NEXT: xscmpudp cr0, f1, f0
1025 ; NO-FAST-P9-NEXT: beq cr0, .LBB26_2
1026 ; NO-FAST-P9-NEXT: # %bb.1: # %entry
1027 ; NO-FAST-P9-NEXT: fmr f2, f3
1028 ; NO-FAST-P9-NEXT: .LBB26_2: # %entry
1029 ; NO-FAST-P9-NEXT: fmr f1, f2
1030 ; NO-FAST-P9-NEXT: blr
1032 %cmp = fcmp oeq double %a, 1.000000e+00
1033 %y.z = select i1 %cmp, double %y, double %z