Stackmap shadows should consider call returns a branch target.
[oota-llvm.git] / test / CodeGen / Mips / mips64-f128.ll
1 ; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips4 -soft-float -O1 \
2 ; RUN:     -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=ALL -check-prefix=C_CC_FMT
3 ; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips64 -soft-float -O1 \
4 ; RUN:     -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=ALL -check-prefix=C_CC_FMT
5 ; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips64r2 -soft-float -O1 \
6 ; RUN:     -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=ALL -check-prefix=C_CC_FMT
7 ; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips64r6 -soft-float -O1 \
8 ; RUN:     -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=ALL -check-prefix=CMP_CC_FMT
9
10 @gld0 = external global fp128
11 @gld1 = external global fp128
12 @gld2 = external global fp128
13 @gf1 = external global float
14 @gd1 = external global double
15
16 ; ALL-LABEL: addLD:
17 ; ALL: ld $25, %call16(__addtf3)
18
19 define fp128 @addLD() {
20 entry:
21   %0 = load fp128* @gld0, align 16
22   %1 = load fp128* @gld1, align 16
23   %add = fadd fp128 %0, %1
24   ret fp128 %add
25 }
26
27 ; ALL-LABEL: subLD:
28 ; ALL: ld $25, %call16(__subtf3)
29
30 define fp128 @subLD() {
31 entry:
32   %0 = load fp128* @gld0, align 16
33   %1 = load fp128* @gld1, align 16
34   %sub = fsub fp128 %0, %1
35   ret fp128 %sub
36 }
37
38 ; ALL-LABEL: mulLD:
39 ; ALL: ld $25, %call16(__multf3)
40
41 define fp128 @mulLD() {
42 entry:
43   %0 = load fp128* @gld0, align 16
44   %1 = load fp128* @gld1, align 16
45   %mul = fmul fp128 %0, %1
46   ret fp128 %mul
47 }
48
49 ; ALL-LABEL: divLD:
50 ; ALL: ld $25, %call16(__divtf3)
51
52 define fp128 @divLD() {
53 entry:
54   %0 = load fp128* @gld0, align 16
55   %1 = load fp128* @gld1, align 16
56   %div = fdiv fp128 %0, %1
57   ret fp128 %div
58 }
59
60 ; ALL-LABEL: conv_LD_char:
61 ; ALL: ld $25, %call16(__floatsitf)
62
63 define fp128 @conv_LD_char(i8 signext %a) {
64 entry:
65   %conv = sitofp i8 %a to fp128
66   ret fp128 %conv
67 }
68
69 ; ALL-LABEL: conv_LD_short:
70 ; ALL: ld $25, %call16(__floatsitf)
71
72 define fp128 @conv_LD_short(i16 signext %a) {
73 entry:
74   %conv = sitofp i16 %a to fp128
75   ret fp128 %conv
76 }
77
78 ; ALL-LABEL: conv_LD_int:
79 ; ALL: ld $25, %call16(__floatsitf)
80
81 define fp128 @conv_LD_int(i32 %a) {
82 entry:
83   %conv = sitofp i32 %a to fp128
84   ret fp128 %conv
85 }
86
87 ; ALL-LABEL: conv_LD_LL:
88 ; ALL: ld $25, %call16(__floatditf)
89
90 define fp128 @conv_LD_LL(i64 %a) {
91 entry:
92   %conv = sitofp i64 %a to fp128
93   ret fp128 %conv
94 }
95
96 ; ALL-LABEL: conv_LD_UChar:
97 ; ALL: ld $25, %call16(__floatunsitf)
98
99 define fp128 @conv_LD_UChar(i8 zeroext %a) {
100 entry:
101   %conv = uitofp i8 %a to fp128
102   ret fp128 %conv
103 }
104
105 ; ALL-LABEL: conv_LD_UShort:
106 ; ALL: ld $25, %call16(__floatunsitf)
107
108 define fp128 @conv_LD_UShort(i16 zeroext %a) {
109 entry:
110   %conv = uitofp i16 %a to fp128
111   ret fp128 %conv
112 }
113
114 ; ALL-LABEL: conv_LD_UInt:
115 ; ALL: ld $25, %call16(__floatunsitf)
116
117 define fp128 @conv_LD_UInt(i32 %a) {
118 entry:
119   %conv = uitofp i32 %a to fp128
120   ret fp128 %conv
121 }
122
123 ; ALL-LABEL: conv_LD_ULL:
124 ; ALL: ld $25, %call16(__floatunditf)
125
126 define fp128 @conv_LD_ULL(i64 %a) {
127 entry:
128   %conv = uitofp i64 %a to fp128
129   ret fp128 %conv
130 }
131
132 ; ALL-LABEL: conv_char_LD:
133 ; ALL: ld $25, %call16(__fixtfsi)
134
135 define signext i8 @conv_char_LD(fp128 %a) {
136 entry:
137   %conv = fptosi fp128 %a to i8
138   ret i8 %conv
139 }
140
141 ; ALL-LABEL: conv_short_LD:
142 ; ALL: ld $25, %call16(__fixtfsi)
143
144 define signext i16 @conv_short_LD(fp128 %a) {
145 entry:
146   %conv = fptosi fp128 %a to i16
147   ret i16 %conv
148 }
149
150 ; ALL-LABEL: conv_int_LD:
151 ; ALL: ld $25, %call16(__fixtfsi)
152
153 define i32 @conv_int_LD(fp128 %a) {
154 entry:
155   %conv = fptosi fp128 %a to i32
156   ret i32 %conv
157 }
158
159 ; ALL-LABEL: conv_LL_LD:
160 ; ALL: ld $25, %call16(__fixtfdi)
161
162 define i64 @conv_LL_LD(fp128 %a) {
163 entry:
164   %conv = fptosi fp128 %a to i64
165   ret i64 %conv
166 }
167
168 ; ALL-LABEL: conv_UChar_LD:
169 ; ALL: ld $25, %call16(__fixtfsi)
170
171 define zeroext i8 @conv_UChar_LD(fp128 %a) {
172 entry:
173   %conv = fptoui fp128 %a to i8
174   ret i8 %conv
175 }
176
177 ; ALL-LABEL: conv_UShort_LD:
178 ; ALL: ld $25, %call16(__fixtfsi)
179
180 define zeroext i16 @conv_UShort_LD(fp128 %a) {
181 entry:
182   %conv = fptoui fp128 %a to i16
183   ret i16 %conv
184 }
185
186 ; ALL-LABEL: conv_UInt_LD:
187 ; ALL: ld $25, %call16(__fixunstfsi)
188
189 define i32 @conv_UInt_LD(fp128 %a) {
190 entry:
191   %conv = fptoui fp128 %a to i32
192   ret i32 %conv
193 }
194
195 ; ALL-LABEL: conv_ULL_LD:
196 ; ALL: ld $25, %call16(__fixunstfdi)
197
198 define i64 @conv_ULL_LD(fp128 %a) {
199 entry:
200   %conv = fptoui fp128 %a to i64
201   ret i64 %conv
202 }
203
204 ; ALL-LABEL: conv_LD_float:
205 ; ALL: ld $25, %call16(__extendsftf2)
206
207 define fp128 @conv_LD_float(float %a) {
208 entry:
209   %conv = fpext float %a to fp128
210   ret fp128 %conv
211 }
212
213 ; ALL-LABEL: conv_LD_double:
214 ; ALL: ld $25, %call16(__extenddftf2)
215
216 define fp128 @conv_LD_double(double %a) {
217 entry:
218   %conv = fpext double %a to fp128
219   ret fp128 %conv
220 }
221
222 ; ALL-LABEL: conv_float_LD:
223 ; ALL: ld $25, %call16(__trunctfsf2)
224
225 define float @conv_float_LD(fp128 %a) {
226 entry:
227   %conv = fptrunc fp128 %a to float
228   ret float %conv
229 }
230
231 ; ALL-LABEL: conv_double_LD:
232 ; ALL: ld $25, %call16(__trunctfdf2)
233
234 define double @conv_double_LD(fp128 %a) {
235 entry:
236   %conv = fptrunc fp128 %a to double
237   ret double %conv
238 }
239
240 ; ALL-LABEL:             libcall1_fabsl:
241 ; ALL-DAG: ld      $[[R0:[0-9]+]], 8($[[R4:[0-9]+]])
242 ; ALL-DAG: daddiu  $[[R1:[0-9]+]], $zero, 1
243 ; ALL-DAG: dsll    $[[R2:[0-9]+]], $[[R1]], 63
244 ; ALL-DAG: daddiu  $[[R3:[0-9]+]], $[[R2]], -1
245 ; ALL-DAG: and     $4, $[[R0]], $[[R3]]
246 ; ALL-DAG: ld      $2, 0($[[R4]])
247
248 define fp128 @libcall1_fabsl() {
249 entry:
250   %0 = load fp128* @gld0, align 16
251   %call = tail call fp128 @fabsl(fp128 %0) nounwind readnone
252   ret fp128 %call
253 }
254
255 declare fp128 @fabsl(fp128) #1
256
257 ; ALL-LABEL: libcall1_ceill:
258 ; ALL: ld $25, %call16(ceill)
259
260 define fp128 @libcall1_ceill() {
261 entry:
262   %0 = load fp128* @gld0, align 16
263   %call = tail call fp128 @ceill(fp128 %0) nounwind readnone
264   ret fp128 %call
265 }
266
267 declare fp128 @ceill(fp128) #1
268
269 ; ALL-LABEL: libcall1_sinl:
270 ; ALL: ld $25, %call16(sinl)
271
272 define fp128 @libcall1_sinl() {
273 entry:
274   %0 = load fp128* @gld0, align 16
275   %call = tail call fp128 @sinl(fp128 %0) nounwind
276   ret fp128 %call
277 }
278
279 declare fp128 @sinl(fp128) #2
280
281 ; ALL-LABEL: libcall1_cosl:
282 ; ALL: ld $25, %call16(cosl)
283
284 define fp128 @libcall1_cosl() {
285 entry:
286   %0 = load fp128* @gld0, align 16
287   %call = tail call fp128 @cosl(fp128 %0) nounwind
288   ret fp128 %call
289 }
290
291 declare fp128 @cosl(fp128) #2
292
293 ; ALL-LABEL: libcall1_expl:
294 ; ALL: ld $25, %call16(expl)
295
296 define fp128 @libcall1_expl() {
297 entry:
298   %0 = load fp128* @gld0, align 16
299   %call = tail call fp128 @expl(fp128 %0) nounwind
300   ret fp128 %call
301 }
302
303 declare fp128 @expl(fp128) #2
304
305 ; ALL-LABEL: libcall1_exp2l:
306 ; ALL: ld $25, %call16(exp2l)
307
308 define fp128 @libcall1_exp2l() {
309 entry:
310   %0 = load fp128* @gld0, align 16
311   %call = tail call fp128 @exp2l(fp128 %0) nounwind
312   ret fp128 %call
313 }
314
315 declare fp128 @exp2l(fp128) #2
316
317 ; ALL-LABEL: libcall1_logl:
318 ; ALL: ld $25, %call16(logl)
319
320 define fp128 @libcall1_logl() {
321 entry:
322   %0 = load fp128* @gld0, align 16
323   %call = tail call fp128 @logl(fp128 %0) nounwind
324   ret fp128 %call
325 }
326
327 declare fp128 @logl(fp128) #2
328
329 ; ALL-LABEL: libcall1_log2l:
330 ; ALL: ld $25, %call16(log2l)
331
332 define fp128 @libcall1_log2l() {
333 entry:
334   %0 = load fp128* @gld0, align 16
335   %call = tail call fp128 @log2l(fp128 %0) nounwind
336   ret fp128 %call
337 }
338
339 declare fp128 @log2l(fp128) #2
340
341 ; ALL-LABEL: libcall1_log10l:
342 ; ALL: ld $25, %call16(log10l)
343
344 define fp128 @libcall1_log10l() {
345 entry:
346   %0 = load fp128* @gld0, align 16
347   %call = tail call fp128 @log10l(fp128 %0) nounwind
348   ret fp128 %call
349 }
350
351 declare fp128 @log10l(fp128) #2
352
353 ; ALL-LABEL: libcall1_nearbyintl:
354 ; ALL: ld $25, %call16(nearbyintl)
355
356 define fp128 @libcall1_nearbyintl() {
357 entry:
358   %0 = load fp128* @gld0, align 16
359   %call = tail call fp128 @nearbyintl(fp128 %0) nounwind readnone
360   ret fp128 %call
361 }
362
363 declare fp128 @nearbyintl(fp128) #1
364
365 ; ALL-LABEL: libcall1_floorl:
366 ; ALL: ld $25, %call16(floorl)
367
368 define fp128 @libcall1_floorl() {
369 entry:
370   %0 = load fp128* @gld0, align 16
371   %call = tail call fp128 @floorl(fp128 %0) nounwind readnone
372   ret fp128 %call
373 }
374
375 declare fp128 @floorl(fp128) #1
376
377 ; ALL-LABEL: libcall1_sqrtl:
378 ; ALL: ld $25, %call16(sqrtl)
379
380 define fp128 @libcall1_sqrtl() {
381 entry:
382   %0 = load fp128* @gld0, align 16
383   %call = tail call fp128 @sqrtl(fp128 %0) nounwind
384   ret fp128 %call
385 }
386
387 declare fp128 @sqrtl(fp128) #2
388
389 ; ALL-LABEL: libcall1_rintl:
390 ; ALL: ld $25, %call16(rintl)
391
392 define fp128 @libcall1_rintl() {
393 entry:
394   %0 = load fp128* @gld0, align 16
395   %call = tail call fp128 @rintl(fp128 %0) nounwind readnone
396   ret fp128 %call
397 }
398
399 declare fp128 @rintl(fp128) #1
400
401 ; ALL-LABEL: libcall_powil:
402 ; ALL: ld $25, %call16(__powitf2)
403
404 define fp128 @libcall_powil(fp128 %a, i32 %b) {
405 entry:
406   %0 = tail call fp128 @llvm.powi.f128(fp128 %a, i32 %b)
407   ret fp128 %0
408 }
409
410 declare fp128 @llvm.powi.f128(fp128, i32) #3
411
412 ; ALL-LABEL:     libcall2_copysignl:
413 ; ALL-DAG: daddiu $[[R2:[0-9]+]], $zero, 1
414 ; ALL-DAG: dsll   $[[R3:[0-9]+]], $[[R2]], 63
415 ; ALL-DAG: ld     $[[R0:[0-9]+]], %got_disp(gld1)
416 ; ALL-DAG: ld     $[[R1:[0-9]+]], 8($[[R0]])
417 ; ALL-DAG: and    $[[R4:[0-9]+]], $[[R1]], $[[R3]]
418 ; ALL-DAG: ld     $[[R5:[0-9]+]], %got_disp(gld0)
419 ; ALL-DAG: ld     $[[R6:[0-9]+]], 8($[[R5]])
420 ; ALL-DAG: daddiu $[[R7:[0-9]+]], $[[R3]], -1
421 ; ALL-DAG: and    $[[R8:[0-9]+]], $[[R6]], $[[R7]]
422 ; ALL-DAG: or     $4, $[[R8]], $[[R4]]
423 ; ALL-DAG: ld     $2, 0($[[R5]])
424
425 define fp128 @libcall2_copysignl() {
426 entry:
427   %0 = load fp128* @gld0, align 16
428   %1 = load fp128* @gld1, align 16
429   %call = tail call fp128 @copysignl(fp128 %0, fp128 %1) nounwind readnone
430   ret fp128 %call
431 }
432
433 declare fp128 @copysignl(fp128, fp128) #1
434
435 ; ALL-LABEL: libcall2_powl:
436 ; ALL: ld $25, %call16(powl)
437
438 define fp128 @libcall2_powl() {
439 entry:
440   %0 = load fp128* @gld0, align 16
441   %1 = load fp128* @gld1, align 16
442   %call = tail call fp128 @powl(fp128 %0, fp128 %1) nounwind
443   ret fp128 %call
444 }
445
446 declare fp128 @powl(fp128, fp128) #2
447
448 ; ALL-LABEL: libcall2_fmodl:
449 ; ALL: ld $25, %call16(fmodl)
450
451 define fp128 @libcall2_fmodl() {
452 entry:
453   %0 = load fp128* @gld0, align 16
454   %1 = load fp128* @gld1, align 16
455   %call = tail call fp128 @fmodl(fp128 %0, fp128 %1) nounwind
456   ret fp128 %call
457 }
458
459 declare fp128 @fmodl(fp128, fp128) #2
460
461 ; ALL-LABEL: libcall3_fmal:
462 ; ALL: ld $25, %call16(fmal)
463
464 define fp128 @libcall3_fmal() {
465 entry:
466   %0 = load fp128* @gld0, align 16
467   %1 = load fp128* @gld2, align 16
468   %2 = load fp128* @gld1, align 16
469   %3 = tail call fp128 @llvm.fma.f128(fp128 %0, fp128 %2, fp128 %1)
470   ret fp128 %3
471 }
472
473 declare fp128 @llvm.fma.f128(fp128, fp128, fp128) #4
474
475 ; ALL-LABEL: cmp_lt:
476 ; ALL: ld $25, %call16(__lttf2)
477
478 define i32 @cmp_lt(fp128 %a, fp128 %b) {
479 entry:
480   %cmp = fcmp olt fp128 %a, %b
481   %conv = zext i1 %cmp to i32
482   ret i32 %conv
483 }
484
485 ; ALL-LABEL: cmp_le:
486 ; ALL: ld $25, %call16(__letf2)
487
488 define i32 @cmp_le(fp128 %a, fp128 %b) {
489 entry:
490   %cmp = fcmp ole fp128 %a, %b
491   %conv = zext i1 %cmp to i32
492   ret i32 %conv
493 }
494
495 ; ALL-LABEL: cmp_gt:
496 ; ALL: ld $25, %call16(__gttf2)
497
498 define i32 @cmp_gt(fp128 %a, fp128 %b) {
499 entry:
500   %cmp = fcmp ogt fp128 %a, %b
501   %conv = zext i1 %cmp to i32
502   ret i32 %conv
503 }
504
505 ; ALL-LABEL: cmp_ge:
506 ; ALL: ld $25, %call16(__getf2)
507
508 define i32 @cmp_ge(fp128 %a, fp128 %b) {
509 entry:
510   %cmp = fcmp oge fp128 %a, %b
511   %conv = zext i1 %cmp to i32
512   ret i32 %conv
513 }
514
515 ; ALL-LABEL: cmp_eq:
516 ; ALL: ld $25, %call16(__eqtf2)
517
518 define i32 @cmp_eq(fp128 %a, fp128 %b) {
519 entry:
520   %cmp = fcmp oeq fp128 %a, %b
521   %conv = zext i1 %cmp to i32
522   ret i32 %conv
523 }
524
525 ; ALL-LABEL: cmp_ne:
526 ; ALL: ld $25, %call16(__netf2)
527
528 define i32 @cmp_ne(fp128 %a, fp128 %b) {
529 entry:
530   %cmp = fcmp une fp128 %a, %b
531   %conv = zext i1 %cmp to i32
532   ret i32 %conv
533 }
534
535 ; ALL-LABEL: load_LD_LD:
536 ; ALL: ld $[[R0:[0-9]+]], %got_disp(gld1)
537 ; ALL: ld $2, 0($[[R0]])
538 ; ALL: ld $4, 8($[[R0]])
539
540 define fp128 @load_LD_LD() {
541 entry:
542   %0 = load fp128* @gld1, align 16
543   ret fp128 %0
544 }
545
546 ; ALL-LABEL: load_LD_float:
547 ; ALL: ld   $[[R0:[0-9]+]], %got_disp(gf1)
548 ; ALL: lw   $4, 0($[[R0]])
549 ; ALL: ld   $25, %call16(__extendsftf2)
550 ; ALL: jalr $25
551
552 define fp128 @load_LD_float() {
553 entry:
554   %0 = load float* @gf1, align 4
555   %conv = fpext float %0 to fp128
556   ret fp128 %conv
557 }
558
559 ; ALL-LABEL: load_LD_double:
560 ; ALL: ld   $[[R0:[0-9]+]], %got_disp(gd1)
561 ; ALL: ld   $4, 0($[[R0]])
562 ; ALL: ld   $25, %call16(__extenddftf2)
563 ; ALL: jalr $25
564
565 define fp128 @load_LD_double() {
566 entry:
567   %0 = load double* @gd1, align 8
568   %conv = fpext double %0 to fp128
569   ret fp128 %conv
570 }
571
572 ; ALL-LABEL: store_LD_LD:
573 ; ALL: ld $[[R0:[0-9]+]], %got_disp(gld1)
574 ; ALL: ld $[[R1:[0-9]+]], 0($[[R0]])
575 ; ALL: ld $[[R2:[0-9]+]], 8($[[R0]])
576 ; ALL: ld $[[R3:[0-9]+]], %got_disp(gld0)
577 ; ALL: sd $[[R2]], 8($[[R3]])
578 ; ALL: sd $[[R1]], 0($[[R3]])
579
580 define void @store_LD_LD() {
581 entry:
582   %0 = load fp128* @gld1, align 16
583   store fp128 %0, fp128* @gld0, align 16
584   ret void
585 }
586
587 ; ALL-LABEL: store_LD_float:
588 ; ALL: ld   $[[R0:[0-9]+]], %got_disp(gld1)
589 ; ALL: ld   $4, 0($[[R0]])
590 ; ALL: ld   $5, 8($[[R0]])
591 ; ALL: ld   $25, %call16(__trunctfsf2)
592 ; ALL: jalr $25
593 ; ALL: ld   $[[R1:[0-9]+]], %got_disp(gf1)
594 ; ALL: sw   $2, 0($[[R1]])
595
596 define void @store_LD_float() {
597 entry:
598   %0 = load fp128* @gld1, align 16
599   %conv = fptrunc fp128 %0 to float
600   store float %conv, float* @gf1, align 4
601   ret void
602 }
603
604 ; ALL-LABEL: store_LD_double:
605 ; ALL: ld   $[[R0:[0-9]+]], %got_disp(gld1)
606 ; ALL: ld   $4, 0($[[R0]])
607 ; ALL: ld   $5, 8($[[R0]])
608 ; ALL: ld   $25, %call16(__trunctfdf2)
609 ; ALL: jalr $25
610 ; ALL: ld   $[[R1:[0-9]+]], %got_disp(gd1)
611 ; ALL: sd   $2, 0($[[R1]])
612
613 define void @store_LD_double() {
614 entry:
615   %0 = load fp128* @gld1, align 16
616   %conv = fptrunc fp128 %0 to double
617   store double %conv, double* @gd1, align 8
618   ret void
619 }
620
621 ; ALL-LABEL: select_LD:
622 ; C_CC_FMT:      movn $8, $6, $4
623 ; C_CC_FMT:      movn $9, $7, $4
624 ; C_CC_FMT:      move $2, $8
625 ; C_CC_FMT:      move $4, $9
626
627 ; FIXME: This sll works around an implementation detail in the code generator
628 ;        (setcc's result is i32 so bits 32-63 are undefined). It's not really
629 ;        needed.
630 ; CMP_CC_FMT-DAG: sll $[[CC:[0-9]+]], $4, 0
631 ; CMP_CC_FMT-DAG: seleqz $[[EQ1:[0-9]+]], $8, $[[CC]]
632 ; CMP_CC_FMT-DAG: selnez $[[NE1:[0-9]+]], $6, $[[CC]]
633 ; CMP_CC_FMT-DAG: or $2, $[[NE1]], $[[EQ1]]
634 ; CMP_CC_FMT-DAG: seleqz $[[EQ2:[0-9]+]], $9, $[[CC]]
635 ; CMP_CC_FMT-DAG: selnez $[[NE2:[0-9]+]], $7, $[[CC]]
636 ; CMP_CC_FMT-DAG: or $4, $[[NE2]], $[[EQ2]]
637
638 define fp128 @select_LD(i32 %a, i64, fp128 %b, fp128 %c) {
639 entry:
640   %tobool = icmp ne i32 %a, 0
641   %cond = select i1 %tobool, fp128 %b, fp128 %c
642   ret fp128 %cond
643 }
644
645 ; ALL-LABEL: selectCC_LD:
646 ; ALL:           move $[[R0:[0-9]+]], $11
647 ; ALL:           move $[[R1:[0-9]+]], $10
648 ; ALL:           move $[[R2:[0-9]+]], $9
649 ; ALL:           move $[[R3:[0-9]+]], $8
650 ; ALL:           ld   $25, %call16(__gttf2)($gp)
651 ; ALL:           jalr $25
652
653 ; C_CC_FMT:      slti $[[CC:[0-9]+]], $2, 1
654 ; C_CC_FMT:      movz $[[R1]], $[[R3]], $[[CC]]
655 ; C_CC_FMT:      movz $[[R0]], $[[R2]], $[[CC]]
656 ; C_CC_FMT:      move $2, $[[R1]]
657 ; C_CC_FMT:      move $4, $[[R0]]
658
659 ; CMP_CC_FMT:    slt $[[CC:[0-9]+]], $zero, $2
660 ; CMP_CC_FMT:    seleqz $[[EQ1:[0-9]+]], $[[R1]], $[[CC]]
661 ; CMP_CC_FMT:    selnez $[[NE1:[0-9]+]], $[[R3]], $[[CC]]
662 ; CMP_CC_FMT:    or $2, $[[NE1]], $[[EQ1]]
663 ; CMP_CC_FMT:    seleqz $[[EQ2:[0-9]+]], $[[R0]], $[[CC]]
664 ; CMP_CC_FMT:    selnez $[[NE2:[0-9]+]], $[[R2]], $[[CC]]
665 ; CMP_CC_FMT:    or $4, $[[NE2]], $[[EQ2]]
666
667 define fp128 @selectCC_LD(fp128 %a, fp128 %b, fp128 %c, fp128 %d) {
668 entry:
669   %cmp = fcmp ogt fp128 %a, %b
670   %cond = select i1 %cmp, fp128 %c, fp128 %d
671   ret fp128 %cond
672 }