1 # RUN: llc -O0 -mtriple arm-linux-gnueabihf -mattr=+vfp2 -float-abi=hard -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix HARD
2 # RUN: llc -O0 -mtriple arm-linux-gnueabi -mattr=+vfp2,+soft-float -float-abi=soft -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix SOFT -check-prefix SOFT-AEABI
3 # RUN: llc -O0 -mtriple arm-linux-gnu -mattr=+soft-float -float-abi=soft -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix SOFT -check-prefix SOFT-DEFAULT
4 # RUN: llc -O0 -mtriple thumb-linux-gnueabihf -mattr=+v6t2,+vfp2 -float-abi=hard -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix HARD
5 # RUN: llc -O0 -mtriple thumb-linux-gnueabi -mattr=+v6t2,+vfp2,+soft-float -float-abi=soft -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix SOFT -check-prefix SOFT-AEABI
6 # RUN: llc -O0 -mtriple thumb-linux-gnu -mattr=+v6t2,+soft-float -float-abi=soft -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix SOFT -check-prefix SOFT-DEFAULT
8 define void @test_frem_float() { ret void }
9 define void @test_frem_double() { ret void }
11 define void @test_fpow_float() { ret void }
12 define void @test_fpow_double() { ret void }
14 define void @test_fadd_float() { ret void }
15 define void @test_fadd_double() { ret void }
17 define void @test_fsub_float() { ret void }
18 define void @test_fsub_double() { ret void }
20 define void @test_fmul_float() { ret void }
21 define void @test_fmul_double() { ret void }
23 define void @test_fdiv_float() { ret void }
24 define void @test_fdiv_double() { ret void }
26 define void @test_fconstant_float() { ret void }
27 define void @test_fconstant_double() { ret void }
29 define void @test_fneg_float() { ret void }
30 define void @test_fneg_double() { ret void }
32 define void @test_fpext_float_to_double() { ret void }
33 define void @test_fptrunc_double_to_float() { ret void }
35 define void @test_fptosi_float() { ret void }
36 define void @test_fptosi_double() { ret void }
37 define void @test_fptoui_float() { ret void }
38 define void @test_fptoui_double() { ret void }
40 define void @test_sitofp_float() { ret void }
41 define void @test_sitofp_double() { ret void }
42 define void @test_uitofp_float() { ret void }
43 define void @test_uitofp_double() { ret void }
45 define void @test_fcmp_true_s32() { ret void }
46 define void @test_fcmp_false_s32() { ret void }
48 define void @test_fcmp_oeq_s32() { ret void }
49 define void @test_fcmp_ogt_s32() { ret void }
50 define void @test_fcmp_oge_s32() { ret void }
51 define void @test_fcmp_olt_s32() { ret void }
52 define void @test_fcmp_ole_s32() { ret void }
53 define void @test_fcmp_ord_s32() { ret void }
54 define void @test_fcmp_ugt_s32() { ret void }
55 define void @test_fcmp_uge_s32() { ret void }
56 define void @test_fcmp_ult_s32() { ret void }
57 define void @test_fcmp_ule_s32() { ret void }
58 define void @test_fcmp_une_s32() { ret void }
59 define void @test_fcmp_uno_s32() { ret void }
61 define void @test_fcmp_one_s32() { ret void }
62 define void @test_fcmp_ueq_s32() { ret void }
64 define void @test_fcmp_true_s64() { ret void }
65 define void @test_fcmp_false_s64() { ret void }
67 define void @test_fcmp_oeq_s64() { ret void }
68 define void @test_fcmp_ogt_s64() { ret void }
69 define void @test_fcmp_oge_s64() { ret void }
70 define void @test_fcmp_olt_s64() { ret void }
71 define void @test_fcmp_ole_s64() { ret void }
72 define void @test_fcmp_ord_s64() { ret void }
73 define void @test_fcmp_ugt_s64() { ret void }
74 define void @test_fcmp_uge_s64() { ret void }
75 define void @test_fcmp_ult_s64() { ret void }
76 define void @test_fcmp_ule_s64() { ret void }
77 define void @test_fcmp_une_s64() { ret void }
78 define void @test_fcmp_uno_s64() { ret void }
80 define void @test_fcmp_one_s64() { ret void }
81 define void @test_fcmp_ueq_s64() { ret void }
85 # CHECK-LABEL: name: test_frem_float
87 # CHECK: legalized: true
88 regBankSelected: false
90 tracksRegLiveness: true
99 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
100 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
104 ; CHECK: ADJCALLSTACKDOWN
105 ; SOFT-DAG: $r0 = COPY [[X]]
106 ; SOFT-DAG: $r1 = COPY [[Y]]
107 ; HARD-DAG: $s0 = COPY [[X]]
108 ; HARD-DAG: $s1 = COPY [[Y]]
109 ; SOFT: BL{{.*}} &fmodf, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
110 ; HARD: BL{{.*}} &fmodf, {{.*}}, implicit $s0, implicit $s1, implicit-def $s0
111 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
112 ; HARD: [[R:%[0-9]+]]:_(s32) = COPY $s0
113 ; CHECK: ADJCALLSTACKUP
115 %2(s32) = G_FREM %0, %1
116 ; CHECK: $r0 = COPY [[R]]
118 BX_RET 14, $noreg, implicit $r0
121 name: test_frem_double
122 # CHECK-LABEL: name: test_frem_double
124 # CHECK: legalized: true
125 regBankSelected: false
127 tracksRegLiveness: true
129 - { id: 0, class: _ }
130 - { id: 1, class: _ }
131 - { id: 2, class: _ }
132 - { id: 3, class: _ }
133 - { id: 4, class: _ }
134 - { id: 5, class: _ }
135 - { id: 6, class: _ }
136 - { id: 7, class: _ }
137 - { id: 8, class: _ }
140 liveins: $r0, $r1, $r2, $r3
142 ; The inputs may be in the wrong order (depending on the target's
143 ; endianness), but that's orthogonal to what we're trying to test here.
144 ; For soft float, we only need to check that the first value, received
145 ; through R0-R1, ends up in R0-R1 or R1-R0, and the second value, received
146 ; through R2-R3, ends up in R2-R3 or R3-R2, when passed to fmod.
147 ; For hard float, the values need to end up in D0 and D1.
148 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
149 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
150 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
151 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
156 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
157 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
158 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
159 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
161 ; CHECK: ADJCALLSTACKDOWN
162 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
163 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
164 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
165 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
166 ; HARD-DAG: $d0 = COPY [[X]]
167 ; HARD-DAG: $d1 = COPY [[Y]]
168 ; SOFT: BL{{.*}} &fmod, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
169 ; HARD: BL{{.*}} &fmod, {{.*}}, implicit $d0, implicit $d1, implicit-def $d0
170 ; CHECK: ADJCALLSTACKUP
172 %6(s64) = G_FREM %4, %5
173 %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64)
176 BX_RET 14, $noreg, implicit $r0, implicit $r1
179 name: test_fpow_float
180 # CHECK-LABEL: name: test_fpow_float
182 # CHECK: legalized: true
183 regBankSelected: false
185 tracksRegLiveness: true
187 - { id: 0, class: _ }
188 - { id: 1, class: _ }
189 - { id: 2, class: _ }
194 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
195 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
199 ; CHECK: ADJCALLSTACKDOWN
200 ; SOFT-DAG: $r0 = COPY [[X]]
201 ; SOFT-DAG: $r1 = COPY [[Y]]
202 ; HARD-DAG: $s0 = COPY [[X]]
203 ; HARD-DAG: $s1 = COPY [[Y]]
204 ; SOFT: BL{{.*}} &powf, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
205 ; HARD: BL{{.*}} &powf, {{.*}}, implicit $s0, implicit $s1, implicit-def $s0
206 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
207 ; HARD: [[R:%[0-9]+]]:_(s32) = COPY $s0
208 ; CHECK: ADJCALLSTACKUP
210 %2(s32) = G_FPOW %0, %1
211 ; CHECK: $r0 = COPY [[R]]
213 BX_RET 14, $noreg, implicit $r0
216 name: test_fpow_double
217 # CHECK-LABEL: name: test_fpow_double
219 # CHECK: legalized: true
220 regBankSelected: false
222 tracksRegLiveness: true
224 - { id: 0, class: _ }
225 - { id: 1, class: _ }
226 - { id: 2, class: _ }
227 - { id: 3, class: _ }
228 - { id: 4, class: _ }
229 - { id: 5, class: _ }
230 - { id: 6, class: _ }
231 - { id: 7, class: _ }
232 - { id: 8, class: _ }
235 liveins: $r0, $r1, $r2, $r3
237 ; The inputs may be in the wrong order (depending on the target's
238 ; endianness), but that's orthogonal to what we're trying to test here.
239 ; For soft float, we only need to check that the first value, received
240 ; through R0-R1, ends up in R0-R1 or R1-R0, and the second value, received
241 ; through R2-R3, ends up in R2-R3 or R3-R2, when passed to pow.
242 ; For hard float, the values need to end up in D0 and D1.
243 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
244 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
245 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
246 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
251 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
252 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
253 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
254 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
256 ; CHECK: ADJCALLSTACKDOWN
257 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
258 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
259 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
260 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
261 ; HARD-DAG: $d0 = COPY [[X]]
262 ; HARD-DAG: $d1 = COPY [[Y]]
263 ; SOFT: BL{{.*}} &pow, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
264 ; HARD: BL{{.*}} &pow, {{.*}}, implicit $d0, implicit $d1, implicit-def $d0
265 ; CHECK: ADJCALLSTACKUP
267 %6(s64) = G_FPOW %4, %5
268 %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64)
271 BX_RET 14, $noreg, implicit $r0, implicit $r1
274 name: test_fadd_float
275 # CHECK-LABEL: name: test_fadd_float
277 # CHECK: legalized: true
278 regBankSelected: false
280 tracksRegLiveness: true
282 - { id: 0, class: _ }
283 - { id: 1, class: _ }
284 - { id: 2, class: _ }
289 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
290 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
293 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FADD [[X]], [[Y]]
295 ; SOFT: ADJCALLSTACKDOWN
296 ; SOFT-DAG: $r0 = COPY [[X]]
297 ; SOFT-DAG: $r1 = COPY [[Y]]
298 ; SOFT-AEABI: BL{{.*}} &__aeabi_fadd, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
299 ; SOFT-DEFAULT: BL{{.*}} &__addsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
300 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
301 ; SOFT: ADJCALLSTACKUP
303 %2(s32) = G_FADD %0, %1
304 ; CHECK: $r0 = COPY [[R]]
306 BX_RET 14, $noreg, implicit $r0
309 name: test_fadd_double
310 # CHECK-LABEL: name: test_fadd_double
312 # CHECK: legalized: true
313 regBankSelected: false
315 tracksRegLiveness: true
317 - { id: 0, class: _ }
318 - { id: 1, class: _ }
319 - { id: 2, class: _ }
320 - { id: 3, class: _ }
321 - { id: 4, class: _ }
322 - { id: 5, class: _ }
323 - { id: 6, class: _ }
324 - { id: 7, class: _ }
325 - { id: 8, class: _ }
328 liveins: $r0, $r1, $r2, $r3
330 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
331 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
332 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
333 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
338 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
339 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
340 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
341 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
342 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FADD [[X]], [[Y]]
344 ; SOFT: ADJCALLSTACKDOWN
345 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
346 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
347 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
348 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
349 ; SOFT-AEABI: BL{{.*}} &__aeabi_dadd, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
350 ; SOFT-DEFAULT: BL{{.*}} &__adddf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
351 ; SOFT: ADJCALLSTACKUP
353 %6(s64) = G_FADD %4, %5
354 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
355 %7(s32),%8(s32) = G_UNMERGE_VALUES %6(s64)
358 BX_RET 14, $noreg, implicit $r0, implicit $r1
361 name: test_fsub_float
362 # CHECK-LABEL: name: test_fsub_float
364 # CHECK: legalized: true
365 regBankSelected: false
367 tracksRegLiveness: true
369 - { id: 0, class: _ }
370 - { id: 1, class: _ }
371 - { id: 2, class: _ }
376 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
377 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
380 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FSUB [[X]], [[Y]]
382 ; SOFT: ADJCALLSTACKDOWN
383 ; SOFT-DAG: $r0 = COPY [[X]]
384 ; SOFT-DAG: $r1 = COPY [[Y]]
385 ; SOFT-AEABI: BL{{.*}} &__aeabi_fsub, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
386 ; SOFT-DEFAULT: BL{{.*}} &__subsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
387 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
388 ; SOFT: ADJCALLSTACKUP
390 %2(s32) = G_FSUB %0, %1
391 ; CHECK: $r0 = COPY [[R]]
393 BX_RET 14, $noreg, implicit $r0
396 name: test_fsub_double
397 # CHECK-LABEL: name: test_fsub_double
399 # CHECK: legalized: true
400 regBankSelected: false
402 tracksRegLiveness: true
404 - { id: 0, class: _ }
405 - { id: 1, class: _ }
406 - { id: 2, class: _ }
407 - { id: 3, class: _ }
408 - { id: 4, class: _ }
409 - { id: 5, class: _ }
410 - { id: 6, class: _ }
411 - { id: 7, class: _ }
412 - { id: 8, class: _ }
415 liveins: $r0, $r1, $r2, $r3
417 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
418 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
419 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
420 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
425 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
426 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
427 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
428 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
429 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FSUB [[X]], [[Y]]
431 ; SOFT: ADJCALLSTACKDOWN
432 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
433 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
434 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
435 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
436 ; SOFT-AEABI: BL{{.*}} &__aeabi_dsub, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
437 ; SOFT-DEFAULT: BL{{.*}} &__subdf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
438 ; SOFT: ADJCALLSTACKUP
440 %6(s64) = G_FSUB %4, %5
441 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
442 %7(s32),%8(s32) = G_UNMERGE_VALUES %6(s64)
445 BX_RET 14, $noreg, implicit $r0, implicit $r1
448 name: test_fmul_float
449 # CHECK-LABEL: name: test_fmul_float
451 # CHECK: legalized: true
452 regBankSelected: false
454 tracksRegLiveness: true
456 - { id: 0, class: _ }
457 - { id: 1, class: _ }
458 - { id: 2, class: _ }
463 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
464 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
467 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FMUL [[X]], [[Y]]
469 ; SOFT: ADJCALLSTACKDOWN
470 ; SOFT-DAG: $r0 = COPY [[X]]
471 ; SOFT-DAG: $r1 = COPY [[Y]]
472 ; SOFT-AEABI: BL{{.*}} &__aeabi_fmul, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
473 ; SOFT-DEFAULT: BL{{.*}} &__mulsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
474 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
475 ; SOFT: ADJCALLSTACKUP
477 %2(s32) = G_FMUL %0, %1
478 ; CHECK: $r0 = COPY [[R]]
480 BX_RET 14, $noreg, implicit $r0
483 name: test_fmul_double
484 # CHECK-LABEL: name: test_fmul_double
486 # CHECK: legalized: true
487 regBankSelected: false
489 tracksRegLiveness: true
491 - { id: 0, class: _ }
492 - { id: 1, class: _ }
493 - { id: 2, class: _ }
494 - { id: 3, class: _ }
495 - { id: 4, class: _ }
496 - { id: 5, class: _ }
497 - { id: 6, class: _ }
498 - { id: 7, class: _ }
499 - { id: 8, class: _ }
502 liveins: $r0, $r1, $r2, $r3
504 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
505 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
506 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
507 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
512 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
513 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
514 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
515 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
516 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FMUL [[X]], [[Y]]
518 ; SOFT: ADJCALLSTACKDOWN
519 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
520 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
521 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
522 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
523 ; SOFT-AEABI: BL{{.*}} &__aeabi_dmul, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
524 ; SOFT-DEFAULT: BL{{.*}} &__muldf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
525 ; SOFT: ADJCALLSTACKUP
527 %6(s64) = G_FMUL %4, %5
528 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
529 %7(s32),%8(s32) = G_UNMERGE_VALUES %6(s64)
532 BX_RET 14, $noreg, implicit $r0, implicit $r1
535 name: test_fdiv_float
536 # CHECK-LABEL: name: test_fdiv_float
538 # CHECK: legalized: true
539 regBankSelected: false
541 tracksRegLiveness: true
543 - { id: 0, class: _ }
544 - { id: 1, class: _ }
545 - { id: 2, class: _ }
550 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
551 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
554 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FDIV [[X]], [[Y]]
556 ; SOFT: ADJCALLSTACKDOWN
557 ; SOFT-DAG: $r0 = COPY [[X]]
558 ; SOFT-DAG: $r1 = COPY [[Y]]
559 ; SOFT-AEABI: BL{{.*}} &__aeabi_fdiv, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
560 ; SOFT-DEFAULT: BL{{.*}} &__divsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
561 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
562 ; SOFT: ADJCALLSTACKUP
564 %2(s32) = G_FDIV %0, %1
565 ; CHECK: $r0 = COPY [[R]]
567 BX_RET 14, $noreg, implicit $r0
570 name: test_fdiv_double
571 # CHECK-LABEL: name: test_fdiv_double
573 # CHECK: legalized: true
574 regBankSelected: false
576 tracksRegLiveness: true
578 - { id: 0, class: _ }
579 - { id: 1, class: _ }
580 - { id: 2, class: _ }
581 - { id: 3, class: _ }
582 - { id: 4, class: _ }
583 - { id: 5, class: _ }
584 - { id: 6, class: _ }
585 - { id: 7, class: _ }
586 - { id: 8, class: _ }
589 liveins: $r0, $r1, $r2, $r3
591 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
592 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
593 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
594 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
599 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
600 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
601 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
602 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
603 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FDIV [[X]], [[Y]]
605 ; SOFT: ADJCALLSTACKDOWN
606 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
607 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
608 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
609 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
610 ; SOFT-AEABI: BL{{.*}} &__aeabi_ddiv, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
611 ; SOFT-DEFAULT: BL{{.*}} &__divdf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
612 ; SOFT: ADJCALLSTACKUP
614 %6(s64) = G_FDIV %4, %5
615 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
616 %7(s32),%8(s32) = G_UNMERGE_VALUES %6(s64)
619 BX_RET 14, $noreg, implicit $r0, implicit $r1
622 name: test_fconstant_float
623 # CHECK-LABEL: name: test_fconstant_float
625 # CHECK: legalized: true
626 regBankSelected: false
628 tracksRegLiveness: true
630 - { id: 0, class: _ }
635 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FCONSTANT float -1.25
636 ; SOFT-NOT: G_FCONSTANT
637 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1080033280
638 ; SOFT-NOT: G_FCONSTANT
639 %0(s32) = G_FCONSTANT float -1.25
640 ; CHECK: $r0 = COPY [[R]]
642 BX_RET 14, $noreg, implicit $r0
645 name: test_fconstant_double
646 # CHECK-LABEL: name: test_fconstant_double
648 # CHECK: legalized: true
649 regBankSelected: false
651 tracksRegLiveness: true
653 - { id: 0, class: _ }
654 - { id: 1, class: _ }
655 - { id: 2, class: _ }
660 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FCONSTANT double -2.4
661 ; SOFT-NOT: G_FCONSTANT
662 ; SOFT-DAG: [[HI:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1073532109
663 ; SOFT-DAG: [[LO:%[0-9]+]]:_(s32) = G_CONSTANT i32 858993459
664 ; SOFT-NOT: G_FCONSTANT
665 %0(s64) = G_FCONSTANT double -2.4
666 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
667 ; SOFT-DAG: $r0 = COPY [[HI]]
668 ; SOFT-DAG: $r1 = COPY [[LO]]
669 %1(s32),%2(s32) = G_UNMERGE_VALUES %0(s64)
672 BX_RET 14, $noreg, implicit $r0, implicit $r1
675 name: test_fneg_float
676 # CHECK-LABEL: name: test_fneg_float
678 # CHECK: legalized: true
679 regBankSelected: false
681 tracksRegLiveness: true
683 - { id: 0, class: _ }
684 - { id: 1, class: _ }
689 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
691 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FNEG [[X]]
692 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
693 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_XOR [[X]], [[ZERO]]
695 ; CHECK: $r0 = COPY [[R]]
697 BX_RET 14, $noreg, implicit $r0
700 name: test_fneg_double
701 # CHECK-LABEL: name: test_fneg_double
703 # CHECK: legalized: true
704 regBankSelected: false
706 tracksRegLiveness: true
708 - { id: 0, class: _ }
709 - { id: 1, class: _ }
710 - { id: 2, class: _ }
711 - { id: 3, class: _ }
712 - { id: 4, class: _ }
713 - { id: 5, class: _ }
718 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
719 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
722 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
723 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
724 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FNEG [[X]]
725 ; HARD: G_UNMERGE_VALUES [[R]](s64)
726 ; SOFT: [[POSITIVE_ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
727 ; SOFT: [[NEGATIVE_ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
728 ; SOFT: [[LOWR:%[0-9]+]]:_(s32) = G_XOR [[X0]], [[POSITIVE_ZERO]]
729 ; SOFT: [[HIGHR:%[0-9]+]]:_(s32) = G_XOR [[X1]], [[NEGATIVE_ZERO]]
730 ; SOFT: $r0 = COPY [[LOWR]]
731 ; SOFT: $r1 = COPY [[HIGHR]]
733 %4(s32),%5(s32) = G_UNMERGE_VALUES %3(s64)
736 BX_RET 14, $noreg, implicit $r0, implicit $r1
739 name: test_fpext_float_to_double
740 # CHECK-LABEL: name: test_fpext_float_to_double
742 # CHECK: legalized: true
743 regBankSelected: false
745 tracksRegLiveness: true
747 - { id: 0, class: _ }
748 - { id: 1, class: _ }
749 - { id: 2, class: _ }
750 - { id: 3, class: _ }
755 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
757 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FPEXT [[X]]
759 ; SOFT: ADJCALLSTACKDOWN
760 ; SOFT-DAG: $r0 = COPY [[X]]
761 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
762 ; SOFT-DEFAULT: BL{{.*}} &__extendsfdf2, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
763 ; SOFT: [[R0:%[0-9]+]]:_(s32) = COPY $r0
764 ; SOFT: [[R1:%[0-9]+]]:_(s32) = COPY $r1
765 ; SOFT: ADJCALLSTACKUP
767 %1(s64) = G_FPEXT %0(s32)
768 ; HARD: G_UNMERGE_VALUES [[R]](s64)
769 ; SOFT-DAG: $r{{[0-1]}} = COPY [[R0]]
770 ; SOFT-DAG: $r{{[0-1]}} = COPY [[R1]]
771 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
774 BX_RET 14, $noreg, implicit $r0, implicit $r1
777 name: test_fptrunc_double_to_float
778 # CHECK-LABEL: name: test_fptrunc_double_to_float
780 # CHECK: legalized: true
781 regBankSelected: false
783 tracksRegLiveness: true
785 - { id: 0, class: _ }
786 - { id: 1, class: _ }
787 - { id: 2, class: _ }
788 - { id: 3, class: _ }
793 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
794 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
795 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
798 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
799 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTRUNC [[X]]
800 ; SOFT-NOT: G_FPTRUNC
801 ; SOFT: ADJCALLSTACKDOWN
802 ; SOFT-DAG: $r0 = COPY [[X0]]
803 ; SOFT-DAG: $r1 = COPY [[X1]]
804 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2f, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
805 ; SOFT-DEFAULT: BL{{.*}} &__truncdfsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
806 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
807 ; SOFT: ADJCALLSTACKUP
808 ; SOFT-NOT: G_FPTRUNC
809 %3(s32) = G_FPTRUNC %2(s64)
810 ; CHECK: $r0 = COPY [[R]]
812 BX_RET 14, $noreg, implicit $r0
815 name: test_fptosi_float
816 # CHECK-LABEL: name: test_fptosi_float
818 # CHECK: legalized: true
819 regBankSelected: false
821 tracksRegLiveness: true
823 - { id: 0, class: _ }
824 - { id: 1, class: _ }
829 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
831 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOSI [[X]]
833 ; SOFT: ADJCALLSTACKDOWN
834 ; SOFT-DAG: $r0 = COPY [[X]]
835 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2iz, {{.*}}, implicit $r0, implicit-def $r0
836 ; SOFT-DEFAULT: BL{{.*}} &__fixsfsi, {{.*}}, implicit $r0, implicit-def $r0
837 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
838 ; SOFT: ADJCALLSTACKUP
840 %1(s32) = G_FPTOSI %0(s32)
841 ; CHECK: $r0 = COPY [[R]]
843 BX_RET 14, $noreg, implicit $r0
846 name: test_fptosi_double
847 # CHECK-LABEL: name: test_fptosi_double
849 # CHECK: legalized: true
850 regBankSelected: false
852 tracksRegLiveness: true
854 - { id: 0, class: _ }
855 - { id: 1, class: _ }
856 - { id: 2, class: _ }
857 - { id: 3, class: _ }
862 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
863 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
866 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
867 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
868 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOSI [[X]]
870 ; SOFT: ADJCALLSTACKDOWN
871 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
872 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
873 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2iz, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
874 ; SOFT-DEFAULT: BL{{.*}} &__fixdfsi, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
875 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
876 ; SOFT: ADJCALLSTACKUP
878 %3(s32) = G_FPTOSI %2(s64)
879 ; CHECK: $r0 = COPY [[R]](s32)
881 BX_RET 14, $noreg, implicit $r0
884 name: test_fptoui_float
885 # CHECK-LABEL: name: test_fptoui_float
887 # CHECK: legalized: true
888 regBankSelected: false
890 tracksRegLiveness: true
892 - { id: 0, class: _ }
893 - { id: 1, class: _ }
898 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
900 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOUI [[X]]
902 ; SOFT: ADJCALLSTACKDOWN
903 ; SOFT-DAG: $r0 = COPY [[X]]
904 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2uiz, {{.*}}, implicit $r0, implicit-def $r0
905 ; SOFT-DEFAULT: BL{{.*}} &__fixunssfsi, {{.*}}, implicit $r0, implicit-def $r0
906 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
907 ; SOFT: ADJCALLSTACKUP
909 %1(s32) = G_FPTOUI %0(s32)
910 ; CHECK: $r0 = COPY [[R]]
912 BX_RET 14, $noreg, implicit $r0
915 name: test_fptoui_double
916 # CHECK-LABEL: name: test_fptoui_double
918 # CHECK: legalized: true
919 regBankSelected: false
921 tracksRegLiveness: true
923 - { id: 0, class: _ }
924 - { id: 1, class: _ }
925 - { id: 2, class: _ }
926 - { id: 3, class: _ }
931 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
932 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
935 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
936 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
937 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOUI [[X]]
939 ; SOFT: ADJCALLSTACKDOWN
940 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
941 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
942 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2uiz, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
943 ; SOFT-DEFAULT: BL{{.*}} &__fixunsdfsi, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
944 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
945 ; SOFT: ADJCALLSTACKUP
947 %3(s32) = G_FPTOUI %2(s64)
948 ; CHECK: $r0 = COPY [[R]](s32)
950 BX_RET 14, $noreg, implicit $r0
953 name: test_sitofp_float
954 # CHECK-LABEL: name: test_sitofp_float
956 # CHECK: legalized: true
957 regBankSelected: false
959 tracksRegLiveness: true
961 - { id: 0, class: _ }
962 - { id: 1, class: _ }
967 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
969 ; HARD: [[R:%[0-9]+]]:_(s32) = G_SITOFP [[X]]
971 ; SOFT: ADJCALLSTACKDOWN
972 ; SOFT-DAG: $r0 = COPY [[X]]
973 ; SOFT-AEABI: BL{{.*}} &__aeabi_i2f, {{.*}}, implicit $r0, implicit-def $r0
974 ; SOFT-DEFAULT: BL{{.*}} &__floatsisf, {{.*}}, implicit $r0, implicit-def $r0
975 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
976 ; SOFT: ADJCALLSTACKUP
978 %1(s32) = G_SITOFP %0(s32)
979 ; CHECK: $r0 = COPY [[R]]
981 BX_RET 14, $noreg, implicit $r0
984 name: test_sitofp_double
985 # CHECK-LABEL: name: test_sitofp_double
987 # CHECK: legalized: true
988 regBankSelected: false
990 tracksRegLiveness: true
992 - { id: 0, class: _ }
993 - { id: 1, class: _ }
994 - { id: 2, class: _ }
995 - { id: 3, class: _ }
1000 ; CHECK: [[X:%[0-9]+]]:_(s32) = COPY $r0
1002 ; HARD: [[R:%[0-9]+]]:_(s64) = G_SITOFP [[X]]
1003 ; SOFT-NOT: G_SITOFP
1004 ; SOFT: ADJCALLSTACKDOWN
1005 ; SOFT: $r0 = COPY [[X]]
1006 ; SOFT-AEABI: BL{{.*}} &__aeabi_i2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1007 ; SOFT-DEFAULT: BL{{.*}} &__floatsidf, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1008 ; SOFT-DAG: [[R0:%[0-9]+]]:_(s32) = COPY $r0
1009 ; SOFT-DAG: [[R1:%[0-9]+]]:_(s32) = COPY $r1
1010 ; SOFT: ADJCALLSTACKUP
1011 ; SOFT-NOT: G_SITOFP
1012 %1(s64) = G_SITOFP %0(s32)
1013 ; HARD: [[R0:%[0-9]+]]:_(s32), [[R1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[R]]
1014 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
1015 ; CHECK-DAG: $r0 = COPY [[R0]](s32)
1016 ; CHECK-DAG: $r1 = COPY [[R1]](s32)
1019 BX_RET 14, $noreg, implicit $r0, implicit $r1
1022 name: test_uitofp_float
1023 # CHECK-LABEL: name: test_uitofp_float
1025 # CHECK: legalized: true
1026 regBankSelected: false
1028 tracksRegLiveness: true
1030 - { id: 0, class: _ }
1031 - { id: 1, class: _ }
1036 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1038 ; HARD: [[R:%[0-9]+]]:_(s32) = G_UITOFP [[X]]
1039 ; SOFT-NOT: G_UITOFP
1040 ; SOFT: ADJCALLSTACKDOWN
1041 ; SOFT-DAG: $r0 = COPY [[X]]
1042 ; SOFT-AEABI: BL{{.*}} &__aeabi_ui2f, {{.*}}, implicit $r0, implicit-def $r0
1043 ; SOFT-DEFAULT: BL{{.*}} &__floatunsisf, {{.*}}, implicit $r0, implicit-def $r0
1044 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
1045 ; SOFT: ADJCALLSTACKUP
1046 ; SOFT-NOT: G_UITOFP
1047 %1(s32) = G_UITOFP %0(s32)
1048 ; CHECK: $r0 = COPY [[R]]
1050 BX_RET 14, $noreg, implicit $r0
1053 name: test_uitofp_double
1054 # CHECK-LABEL: name: test_uitofp_double
1056 # CHECK: legalized: true
1057 regBankSelected: false
1059 tracksRegLiveness: true
1061 - { id: 0, class: _ }
1062 - { id: 1, class: _ }
1063 - { id: 2, class: _ }
1064 - { id: 3, class: _ }
1069 ; CHECK: [[X:%[0-9]+]]:_(s32) = COPY $r0
1071 ; HARD: [[R:%[0-9]+]]:_(s64) = G_UITOFP [[X]]
1072 ; SOFT-NOT: G_UITOFP
1073 ; SOFT: ADJCALLSTACKDOWN
1074 ; SOFT: $r0 = COPY [[X]]
1075 ; SOFT-AEABI: BL{{.*}} &__aeabi_ui2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1076 ; SOFT-DEFAULT: BL{{.*}} &__floatunsidf, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1077 ; SOFT-DAG: [[R0:%[0-9]+]]:_(s32) = COPY $r0
1078 ; SOFT-DAG: [[R1:%[0-9]+]]:_(s32) = COPY $r1
1079 ; SOFT: ADJCALLSTACKUP
1080 ; SOFT-NOT: G_UITOFP
1081 %1(s64) = G_UITOFP %0(s32)
1082 ; HARD: [[R0:%[0-9]+]]:_(s32), [[R1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[R]]
1083 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
1084 ; CHECK-DAG: $r0 = COPY [[R0]](s32)
1085 ; CHECK-DAG: $r1 = COPY [[R1]](s32)
1088 BX_RET 14, $noreg, implicit $r0, implicit $r1
1091 name: test_fcmp_true_s32
1092 # CHECK-LABEL: name: test_fcmp_true_s32
1094 # CHECK: legalized: true
1095 regBankSelected: false
1097 tracksRegLiveness: true
1099 - { id: 0, class: _ }
1100 - { id: 1, class: _ }
1101 - { id: 2, class: _ }
1102 - { id: 3, class: _ }
1109 %2(s1) = G_FCMP floatpred(true), %0(s32), %1
1110 %3(s32) = G_ZEXT %2(s1)
1112 BX_RET 14, $noreg, implicit $r0
1113 ; HARD-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1114 ; HARD-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1115 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(true), [[X]](s32), [[Y]]
1116 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1118 ; For soft float we just need to return a '-1' constant, but the truncation
1119 ; to 1 bit is converted by the combiner to the following masking sequence.
1120 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1121 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = COPY [[R]](s32)
1123 ; CHECK: $r0 = COPY [[REXT]]
1126 name: test_fcmp_false_s32
1127 # CHECK-LABEL: name: test_fcmp_false_s32
1129 # CHECK: legalized: true
1130 regBankSelected: false
1132 tracksRegLiveness: true
1134 - { id: 0, class: _ }
1135 - { id: 1, class: _ }
1136 - { id: 2, class: _ }
1137 - { id: 3, class: _ }
1144 %2(s1) = G_FCMP floatpred(false), %0(s32), %1
1145 %3(s32) = G_ZEXT %2(s1)
1147 BX_RET 14, $noreg, implicit $r0
1148 ; HARD-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1149 ; HARD-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1150 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(false), [[X]](s32), [[Y]]
1151 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1153 ; For soft float we just need to return a '0' constant, but the truncation
1154 ; to 1 bit is converted by the combiner to the following masking sequence.
1155 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1156 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = COPY [[R]](s32)
1158 ; CHECK: $r0 = COPY [[REXT]]
1161 name: test_fcmp_oeq_s32
1162 # CHECK-LABEL: name: test_fcmp_oeq_s32
1164 # CHECK: legalized: true
1165 regBankSelected: false
1167 tracksRegLiveness: true
1169 - { id: 0, class: _ }
1170 - { id: 1, class: _ }
1171 - { id: 2, class: _ }
1172 - { id: 3, class: _ }
1179 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1180 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1181 %2(s1) = G_FCMP floatpred(oeq), %0(s32), %1
1182 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oeq), [[X]](s32), [[Y]]
1183 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1185 ; SOFT: ADJCALLSTACKDOWN
1186 ; SOFT-DAG: $r0 = COPY [[X]]
1187 ; SOFT-DAG: $r1 = COPY [[Y]]
1188 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1189 ; SOFT-DEFAULT: BL{{.*}} &__eqsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1190 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1191 ; SOFT: ADJCALLSTACKUP
1192 ; For aeabi, we just need to truncate the result. The combiner changes the
1193 ; truncation into the following masking sequence.
1194 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1195 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1196 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1197 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1198 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1200 %3(s32) = G_ZEXT %2(s1)
1202 ; CHECK: $r0 = COPY [[REXT]]
1203 BX_RET 14, $noreg, implicit $r0
1206 name: test_fcmp_ogt_s32
1207 # CHECK-LABEL: name: test_fcmp_ogt_s32
1209 # CHECK: legalized: true
1210 regBankSelected: false
1212 tracksRegLiveness: true
1214 - { id: 0, class: _ }
1215 - { id: 1, class: _ }
1216 - { id: 2, class: _ }
1217 - { id: 3, class: _ }
1224 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1225 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1226 %2(s1) = G_FCMP floatpred(ogt), %0(s32), %1
1227 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ogt), [[X]](s32), [[Y]]
1228 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1230 ; SOFT: ADJCALLSTACKDOWN
1231 ; SOFT-DAG: $r0 = COPY [[X]]
1232 ; SOFT-DAG: $r1 = COPY [[Y]]
1233 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1234 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1235 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1236 ; SOFT: ADJCALLSTACKUP
1237 ; For aeabi, we just need to truncate the result. The combiner changes the
1238 ; truncation into the following masking sequence.
1239 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1240 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1241 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1242 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1243 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1245 %3(s32) = G_ZEXT %2(s1)
1247 ; CHECK: $r0 = COPY [[REXT]]
1248 BX_RET 14, $noreg, implicit $r0
1251 name: test_fcmp_oge_s32
1252 # CHECK-LABEL: name: test_fcmp_oge_s32
1254 # CHECK: legalized: true
1255 regBankSelected: false
1257 tracksRegLiveness: true
1259 - { id: 0, class: _ }
1260 - { id: 1, class: _ }
1261 - { id: 2, class: _ }
1262 - { id: 3, class: _ }
1269 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1270 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1271 %2(s1) = G_FCMP floatpred(oge), %0(s32), %1
1272 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oge), [[X]](s32), [[Y]]
1273 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1275 ; SOFT: ADJCALLSTACKDOWN
1276 ; SOFT-DAG: $r0 = COPY [[X]]
1277 ; SOFT-DAG: $r1 = COPY [[Y]]
1278 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpge, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1279 ; SOFT-DEFAULT: BL{{.*}} &__gesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1280 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1281 ; SOFT: ADJCALLSTACKUP
1282 ; For aeabi, we just need to truncate the result. The combiner changes the
1283 ; truncation into the following masking sequence.
1284 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1285 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1286 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1287 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
1288 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1290 %3(s32) = G_ZEXT %2(s1)
1292 ; CHECK: $r0 = COPY [[REXT]]
1293 BX_RET 14, $noreg, implicit $r0
1296 name: test_fcmp_olt_s32
1297 # CHECK-LABEL: name: test_fcmp_olt_s32
1299 # CHECK: legalized: true
1300 regBankSelected: false
1302 tracksRegLiveness: true
1304 - { id: 0, class: _ }
1305 - { id: 1, class: _ }
1306 - { id: 2, class: _ }
1307 - { id: 3, class: _ }
1314 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1315 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1316 %2(s1) = G_FCMP floatpred(olt), %0(s32), %1
1317 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(olt), [[X]](s32), [[Y]]
1318 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1320 ; SOFT: ADJCALLSTACKDOWN
1321 ; SOFT-DAG: $r0 = COPY [[X]]
1322 ; SOFT-DAG: $r1 = COPY [[Y]]
1323 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1324 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1325 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1326 ; SOFT: ADJCALLSTACKUP
1327 ; For aeabi, we just need to truncate the result. The combiner changes the
1328 ; truncation into the following masking sequence.
1329 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1330 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1331 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1332 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
1333 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1335 %3(s32) = G_ZEXT %2(s1)
1337 ; CHECK: $r0 = COPY [[REXT]]
1338 BX_RET 14, $noreg, implicit $r0
1341 name: test_fcmp_ole_s32
1342 # CHECK-LABEL: name: test_fcmp_ole_s32
1344 # CHECK: legalized: true
1345 regBankSelected: false
1347 tracksRegLiveness: true
1349 - { id: 0, class: _ }
1350 - { id: 1, class: _ }
1351 - { id: 2, class: _ }
1352 - { id: 3, class: _ }
1359 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1360 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1361 %2(s1) = G_FCMP floatpred(ole), %0(s32), %1
1362 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ole), [[X]](s32), [[Y]]
1363 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1365 ; SOFT: ADJCALLSTACKDOWN
1366 ; SOFT-DAG: $r0 = COPY [[X]]
1367 ; SOFT-DAG: $r1 = COPY [[Y]]
1368 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmple, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1369 ; SOFT-DEFAULT: BL{{.*}} &__lesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1370 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1371 ; SOFT: ADJCALLSTACKUP
1372 ; For aeabi, we just need to truncate the result. The combiner changes the
1373 ; truncation into the following masking sequence.
1374 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1375 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1376 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1377 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
1378 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1380 %3(s32) = G_ZEXT %2(s1)
1382 ; CHECK: $r0 = COPY [[REXT]]
1383 BX_RET 14, $noreg, implicit $r0
1386 name: test_fcmp_ord_s32
1387 # CHECK-LABEL: name: test_fcmp_ord_s32
1389 # CHECK: legalized: true
1390 regBankSelected: false
1392 tracksRegLiveness: true
1394 - { id: 0, class: _ }
1395 - { id: 1, class: _ }
1396 - { id: 2, class: _ }
1397 - { id: 3, class: _ }
1404 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1405 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1406 %2(s1) = G_FCMP floatpred(ord), %0(s32), %1
1407 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ord), [[X]](s32), [[Y]]
1409 ; SOFT: ADJCALLSTACKDOWN
1410 ; SOFT-DAG: $r0 = COPY [[X]]
1411 ; SOFT-DAG: $r1 = COPY [[Y]]
1412 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1413 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1414 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1415 ; SOFT: ADJCALLSTACKUP
1416 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1417 ; SOFT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1419 %3(s32) = G_ZEXT %2(s1)
1420 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1422 ; CHECK: $r0 = COPY [[REXT]]
1423 BX_RET 14, $noreg, implicit $r0
1426 name: test_fcmp_ugt_s32
1427 # CHECK-LABEL: name: test_fcmp_ugt_s32
1429 # CHECK: legalized: true
1430 regBankSelected: false
1432 tracksRegLiveness: true
1434 - { id: 0, class: _ }
1435 - { id: 1, class: _ }
1436 - { id: 2, class: _ }
1437 - { id: 3, class: _ }
1444 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1445 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1446 %2(s1) = G_FCMP floatpred(ugt), %0(s32), %1
1447 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ugt), [[X]](s32), [[Y]]
1449 ; SOFT: ADJCALLSTACKDOWN
1450 ; SOFT-DAG: $r0 = COPY [[X]]
1451 ; SOFT-DAG: $r1 = COPY [[Y]]
1452 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmple, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1453 ; SOFT-DEFAULT: BL{{.*}} &__lesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1454 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1455 ; SOFT: ADJCALLSTACKUP
1456 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1457 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1458 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1460 %3(s32) = G_ZEXT %2(s1)
1461 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1463 ; CHECK: $r0 = COPY [[REXT]]
1464 BX_RET 14, $noreg, implicit $r0
1467 name: test_fcmp_uge_s32
1468 # CHECK-LABEL: name: test_fcmp_uge_s32
1470 # CHECK: legalized: true
1471 regBankSelected: false
1473 tracksRegLiveness: true
1475 - { id: 0, class: _ }
1476 - { id: 1, class: _ }
1477 - { id: 2, class: _ }
1478 - { id: 3, class: _ }
1485 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1486 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1487 %2(s1) = G_FCMP floatpred(uge), %0(s32), %1
1488 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uge), [[X]](s32), [[Y]]
1490 ; SOFT: ADJCALLSTACKDOWN
1491 ; SOFT-DAG: $r0 = COPY [[X]]
1492 ; SOFT-DAG: $r1 = COPY [[Y]]
1493 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1494 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1495 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1496 ; SOFT: ADJCALLSTACKUP
1497 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1498 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1499 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
1501 %3(s32) = G_ZEXT %2(s1)
1502 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1504 ; CHECK: $r0 = COPY [[REXT]]
1505 BX_RET 14, $noreg, implicit $r0
1508 name: test_fcmp_ult_s32
1509 # CHECK-LABEL: name: test_fcmp_ult_s32
1511 # CHECK: legalized: true
1512 regBankSelected: false
1514 tracksRegLiveness: true
1516 - { id: 0, class: _ }
1517 - { id: 1, class: _ }
1518 - { id: 2, class: _ }
1519 - { id: 3, class: _ }
1526 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1527 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1528 %2(s1) = G_FCMP floatpred(ult), %0(s32), %1
1529 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ult), [[X]](s32), [[Y]]
1531 ; SOFT: ADJCALLSTACKDOWN
1532 ; SOFT-DAG: $r0 = COPY [[X]]
1533 ; SOFT-DAG: $r1 = COPY [[Y]]
1534 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpge, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1535 ; SOFT-DEFAULT: BL{{.*}} &__gesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1536 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1537 ; SOFT: ADJCALLSTACKUP
1538 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1539 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1540 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
1542 %3(s32) = G_ZEXT %2(s1)
1543 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1545 ; CHECK: $r0 = COPY [[REXT]]
1546 BX_RET 14, $noreg, implicit $r0
1549 name: test_fcmp_ule_s32
1550 # CHECK-LABEL: name: test_fcmp_ule_s32
1552 # CHECK: legalized: true
1553 regBankSelected: false
1555 tracksRegLiveness: true
1557 - { id: 0, class: _ }
1558 - { id: 1, class: _ }
1559 - { id: 2, class: _ }
1560 - { id: 3, class: _ }
1567 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1568 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1569 %2(s1) = G_FCMP floatpred(ule), %0(s32), %1
1570 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ule), [[X]](s32), [[Y]]
1572 ; SOFT: ADJCALLSTACKDOWN
1573 ; SOFT-DAG: $r0 = COPY [[X]]
1574 ; SOFT-DAG: $r1 = COPY [[Y]]
1575 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1576 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1577 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1578 ; SOFT: ADJCALLSTACKUP
1579 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1580 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1581 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
1583 %3(s32) = G_ZEXT %2(s1)
1584 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1586 ; CHECK: $r0 = COPY [[REXT]]
1587 BX_RET 14, $noreg, implicit $r0
1590 name: test_fcmp_une_s32
1591 # CHECK-LABEL: name: test_fcmp_une_s32
1593 # CHECK: legalized: true
1594 regBankSelected: false
1596 tracksRegLiveness: true
1598 - { id: 0, class: _ }
1599 - { id: 1, class: _ }
1600 - { id: 2, class: _ }
1601 - { id: 3, class: _ }
1608 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1609 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1610 %2(s1) = G_FCMP floatpred(une), %0(s32), %1
1611 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(une), [[X]](s32), [[Y]]
1613 ; SOFT: ADJCALLSTACKDOWN
1614 ; SOFT-DAG: $r0 = COPY [[X]]
1615 ; SOFT-DAG: $r1 = COPY [[Y]]
1616 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1617 ; SOFT-DEFAULT: BL{{.*}} &__nesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1618 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1619 ; SOFT: ADJCALLSTACKUP
1620 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1621 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1622 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
1624 %3(s32) = G_ZEXT %2(s1)
1625 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1627 ; CHECK: $r0 = COPY [[REXT]]
1628 BX_RET 14, $noreg, implicit $r0
1631 name: test_fcmp_uno_s32
1632 # CHECK-LABEL: name: test_fcmp_uno_s32
1634 # CHECK: legalized: true
1635 regBankSelected: false
1637 tracksRegLiveness: true
1639 - { id: 0, class: _ }
1640 - { id: 1, class: _ }
1641 - { id: 2, class: _ }
1642 - { id: 3, class: _ }
1649 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1650 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1651 %2(s1) = G_FCMP floatpred(uno), %0(s32), %1
1652 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uno), [[X]](s32), [[Y]]
1653 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1655 ; SOFT: ADJCALLSTACKDOWN
1656 ; SOFT-DAG: $r0 = COPY [[X]]
1657 ; SOFT-DAG: $r1 = COPY [[Y]]
1658 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1659 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1660 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1661 ; SOFT: ADJCALLSTACKUP
1662 ; For aeabi, we just need to truncate the result. The combiner changes the
1663 ; truncation into the following masking sequence.
1664 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1665 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1666 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1667 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
1668 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1670 %3(s32) = G_ZEXT %2(s1)
1672 ; CHECK: $r0 = COPY [[REXT]]
1673 BX_RET 14, $noreg, implicit $r0
1676 name: test_fcmp_one_s32
1677 # CHECK-LABEL: name: test_fcmp_one_s32
1679 # CHECK: legalized: true
1680 regBankSelected: false
1682 tracksRegLiveness: true
1684 - { id: 0, class: _ }
1685 - { id: 1, class: _ }
1686 - { id: 2, class: _ }
1687 - { id: 3, class: _ }
1694 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1695 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1696 %2(s1) = G_FCMP floatpred(one), %0(s32), %1
1697 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(one), [[X]](s32), [[Y]]
1698 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1700 ; SOFT: ADJCALLSTACKDOWN
1701 ; SOFT-DAG: $r0 = COPY [[X]]
1702 ; SOFT-DAG: $r1 = COPY [[Y]]
1703 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1704 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1705 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
1706 ; SOFT: ADJCALLSTACKUP
1707 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1708 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET1]](s32), [[ZERO]]
1710 ; SOFT: ADJCALLSTACKDOWN
1711 ; SOFT-DAG: $r0 = COPY [[X]]
1712 ; SOFT-DAG: $r1 = COPY [[Y]]
1713 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1714 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1715 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
1716 ; SOFT: ADJCALLSTACKUP
1717 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET2]](s32), [[ZERO]]
1718 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
1719 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
1720 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_OR [[RET1]], [[RET2]]
1721 ; SOFT-DEFAULT:[[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
1722 ; The result of the G_OR needs to be truncated, and the combiner turns the
1723 ; truncation into the following masking sequence.
1724 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1725 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[R]], [[MASK]]
1727 %3(s32) = G_ZEXT %2(s1)
1729 ; CHECK: $r0 = COPY [[REXT]]
1730 BX_RET 14, $noreg, implicit $r0
1733 name: test_fcmp_ueq_s32
1734 # CHECK-LABEL: name: test_fcmp_ueq_s32
1736 # CHECK: legalized: true
1737 regBankSelected: false
1739 tracksRegLiveness: true
1741 - { id: 0, class: _ }
1742 - { id: 1, class: _ }
1743 - { id: 2, class: _ }
1744 - { id: 3, class: _ }
1751 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1752 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1753 %2(s1) = G_FCMP floatpred(ueq), %0(s32), %1
1754 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ueq), [[X]](s32), [[Y]]
1755 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1757 ; SOFT: ADJCALLSTACKDOWN
1758 ; SOFT-DAG: $r0 = COPY [[X]]
1759 ; SOFT-DAG: $r1 = COPY [[Y]]
1760 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1761 ; SOFT-DEFAULT: BL{{.*}} &__eqsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1762 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
1763 ; SOFT: ADJCALLSTACKUP
1764 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1765 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET1]](s32), [[ZERO]]
1767 ; SOFT: ADJCALLSTACKDOWN
1768 ; SOFT-DAG: $r0 = COPY [[X]]
1769 ; SOFT-DAG: $r1 = COPY [[Y]]
1770 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1771 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1772 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
1773 ; SOFT: ADJCALLSTACKUP
1774 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET2]](s32), [[ZERO]]
1775 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
1776 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
1777 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_OR [[RET1]], [[RET2]]
1778 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
1779 ; The result of the G_OR needs to be truncated, and the combiner turns the
1780 ; truncation into the following masking sequence.
1781 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1782 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[R]], [[MASK]]
1784 %3(s32) = G_ZEXT %2(s1)
1786 ; CHECK: $r0 = COPY [[REXT]]
1787 BX_RET 14, $noreg, implicit $r0
1790 name: test_fcmp_true_s64
1791 # CHECK-LABEL: name: test_fcmp_true_s64
1793 # CHECK: legalized: true
1794 regBankSelected: false
1796 tracksRegLiveness: true
1798 - { id: 0, class: _ }
1799 - { id: 1, class: _ }
1800 - { id: 2, class: _ }
1801 - { id: 3, class: _ }
1802 - { id: 4, class: _ }
1803 - { id: 5, class: _ }
1804 - { id: 6, class: _ }
1805 - { id: 7, class: _ }
1808 liveins: $r0, $r1, $r2, $r3
1814 ; HARD-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1815 ; HARD-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1816 ; HARD-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1817 ; HARD-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1818 %4(s64) = G_MERGE_VALUES %0(s32), %1
1819 %5(s64) = G_MERGE_VALUES %2(s32), %3
1820 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1821 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1822 %6(s1) = G_FCMP floatpred(true), %4(s64), %5
1823 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(true), [[X]](s64), [[Y]]
1824 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1826 ; The result needs to be truncated, and the combiner turns the truncation
1827 ; into the following masking sequence.
1828 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1829 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = COPY [[MASK]]
1831 %7(s32) = G_ZEXT %6(s1)
1833 ; CHECK: $r0 = COPY [[REXT]]
1834 BX_RET 14, $noreg, implicit $r0
1837 name: test_fcmp_false_s64
1838 # CHECK-LABEL: name: test_fcmp_false_s64
1840 # CHECK: legalized: true
1841 regBankSelected: false
1843 tracksRegLiveness: true
1845 - { id: 0, class: _ }
1846 - { id: 1, class: _ }
1847 - { id: 2, class: _ }
1848 - { id: 3, class: _ }
1849 - { id: 4, class: _ }
1850 - { id: 5, class: _ }
1851 - { id: 6, class: _ }
1852 - { id: 7, class: _ }
1855 liveins: $r0, $r1, $r2, $r3
1861 ; HARD-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1862 ; HARD-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1863 ; HARD-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1864 ; HARD-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1865 %4(s64) = G_MERGE_VALUES %0(s32), %1
1866 %5(s64) = G_MERGE_VALUES %2(s32), %3
1867 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1868 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1869 %6(s1) = G_FCMP floatpred(false), %4(s64), %5
1870 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(false), [[X]](s64), [[Y]]
1871 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1873 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1874 ; The result needs to be truncated, and the combiner turns the truncation
1875 ; into the following masking sequence.
1876 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = COPY [[R]]
1879 %7(s32) = G_ZEXT %6(s1)
1881 ; CHECK: $r0 = COPY [[REXT]]
1882 BX_RET 14, $noreg, implicit $r0
1885 name: test_fcmp_oeq_s64
1886 # CHECK-LABEL: name: test_fcmp_oeq_s64
1888 # CHECK: legalized: true
1889 regBankSelected: false
1891 tracksRegLiveness: true
1893 - { id: 0, class: _ }
1894 - { id: 1, class: _ }
1895 - { id: 2, class: _ }
1896 - { id: 3, class: _ }
1897 - { id: 4, class: _ }
1898 - { id: 5, class: _ }
1899 - { id: 6, class: _ }
1900 - { id: 7, class: _ }
1903 liveins: $r0, $r1, $r2, $r3
1909 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1910 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1911 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1912 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1913 %4(s64) = G_MERGE_VALUES %0(s32), %1
1914 %5(s64) = G_MERGE_VALUES %2(s32), %3
1915 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1916 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1917 %6(s1) = G_FCMP floatpred(oeq), %4(s64), %5
1918 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oeq), [[X]](s64), [[Y]]
1919 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1921 ; SOFT: ADJCALLSTACKDOWN
1922 ; SOFT-DAG: $r0 = COPY [[X0]]
1923 ; SOFT-DAG: $r1 = COPY [[X1]]
1924 ; SOFT-DAG: $r2 = COPY [[Y0]]
1925 ; SOFT-DAG: $r3 = COPY [[Y1]]
1926 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1927 ; SOFT-DEFAULT: BL{{.*}} &__eqdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1928 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1929 ; SOFT: ADJCALLSTACKUP
1930 ; For aeabi, we just need to truncate the result. The combiner changes the
1931 ; truncation into the following masking sequence.
1932 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1933 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1934 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1935 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1936 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1938 %7(s32) = G_ZEXT %6(s1)
1940 ; CHECK: $r0 = COPY [[REXT]]
1941 BX_RET 14, $noreg, implicit $r0
1944 name: test_fcmp_ogt_s64
1945 # CHECK-LABEL: name: test_fcmp_ogt_s64
1947 # CHECK: legalized: true
1948 regBankSelected: false
1950 tracksRegLiveness: true
1952 - { id: 0, class: _ }
1953 - { id: 1, class: _ }
1954 - { id: 2, class: _ }
1955 - { id: 3, class: _ }
1956 - { id: 4, class: _ }
1957 - { id: 5, class: _ }
1958 - { id: 6, class: _ }
1959 - { id: 7, class: _ }
1962 liveins: $r0, $r1, $r2, $r3
1968 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1969 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1970 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1971 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1972 %4(s64) = G_MERGE_VALUES %0(s32), %1
1973 %5(s64) = G_MERGE_VALUES %2(s32), %3
1974 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1975 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1976 %6(s1) = G_FCMP floatpred(ogt), %4(s64), %5
1977 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ogt), [[X]](s64), [[Y]]
1978 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1980 ; SOFT: ADJCALLSTACKDOWN
1981 ; SOFT-DAG: $r0 = COPY [[X0]]
1982 ; SOFT-DAG: $r1 = COPY [[X1]]
1983 ; SOFT-DAG: $r2 = COPY [[Y0]]
1984 ; SOFT-DAG: $r3 = COPY [[Y1]]
1985 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1986 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1987 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1988 ; SOFT: ADJCALLSTACKUP
1989 ; For aeabi, we just need to truncate the result. The combiner changes the
1990 ; truncation into the following masking sequence.
1991 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1992 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1993 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1994 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1995 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1997 %7(s32) = G_ZEXT %6(s1)
1999 ; CHECK: $r0 = COPY [[REXT]]
2000 BX_RET 14, $noreg, implicit $r0
2003 name: test_fcmp_oge_s64
2004 # CHECK-LABEL: name: test_fcmp_oge_s64
2006 # CHECK: legalized: true
2007 regBankSelected: false
2009 tracksRegLiveness: true
2011 - { id: 0, class: _ }
2012 - { id: 1, class: _ }
2013 - { id: 2, class: _ }
2014 - { id: 3, class: _ }
2015 - { id: 4, class: _ }
2016 - { id: 5, class: _ }
2017 - { id: 6, class: _ }
2018 - { id: 7, class: _ }
2021 liveins: $r0, $r1, $r2, $r3
2027 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2028 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2029 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2030 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2031 %4(s64) = G_MERGE_VALUES %0(s32), %1
2032 %5(s64) = G_MERGE_VALUES %2(s32), %3
2033 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2034 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2035 %6(s1) = G_FCMP floatpred(oge), %4(s64), %5
2036 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oge), [[X]](s64), [[Y]]
2037 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2039 ; SOFT: ADJCALLSTACKDOWN
2040 ; SOFT-DAG: $r0 = COPY [[X0]]
2041 ; SOFT-DAG: $r1 = COPY [[X1]]
2042 ; SOFT-DAG: $r2 = COPY [[Y0]]
2043 ; SOFT-DAG: $r3 = COPY [[Y1]]
2044 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpge, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2045 ; SOFT-DEFAULT: BL{{.*}} &__gedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2046 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2047 ; SOFT: ADJCALLSTACKUP
2048 ; For aeabi, we just need to truncate the result. The combiner changes the
2049 ; truncation into the following masking sequence.
2050 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2051 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
2052 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2053 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
2054 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2056 %7(s32) = G_ZEXT %6(s1)
2058 ; CHECK: $r0 = COPY [[REXT]]
2059 BX_RET 14, $noreg, implicit $r0
2062 name: test_fcmp_olt_s64
2063 # CHECK-LABEL: name: test_fcmp_olt_s64
2065 # CHECK: legalized: true
2066 regBankSelected: false
2068 tracksRegLiveness: true
2070 - { id: 0, class: _ }
2071 - { id: 1, class: _ }
2072 - { id: 2, class: _ }
2073 - { id: 3, class: _ }
2074 - { id: 4, class: _ }
2075 - { id: 5, class: _ }
2076 - { id: 6, class: _ }
2077 - { id: 7, class: _ }
2080 liveins: $r0, $r1, $r2, $r3
2086 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2087 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2088 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2089 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2090 %4(s64) = G_MERGE_VALUES %0(s32), %1
2091 %5(s64) = G_MERGE_VALUES %2(s32), %3
2092 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2093 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2094 %6(s1) = G_FCMP floatpred(olt), %4(s64), %5
2095 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(olt), [[X]](s64), [[Y]]
2096 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2098 ; SOFT: ADJCALLSTACKDOWN
2099 ; SOFT-DAG: $r0 = COPY [[X0]]
2100 ; SOFT-DAG: $r1 = COPY [[X1]]
2101 ; SOFT-DAG: $r2 = COPY [[Y0]]
2102 ; SOFT-DAG: $r3 = COPY [[Y1]]
2103 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2104 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2105 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2106 ; SOFT: ADJCALLSTACKUP
2107 ; For aeabi, we just need to truncate the result. The combiner changes the
2108 ; truncation into the following masking sequence.
2109 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2110 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
2111 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2112 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
2113 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2115 %7(s32) = G_ZEXT %6(s1)
2117 ; CHECK: $r0 = COPY [[REXT]]
2118 BX_RET 14, $noreg, implicit $r0
2121 name: test_fcmp_ole_s64
2122 # CHECK-LABEL: name: test_fcmp_ole_s64
2124 # CHECK: legalized: true
2125 regBankSelected: false
2127 tracksRegLiveness: true
2129 - { id: 0, class: _ }
2130 - { id: 1, class: _ }
2131 - { id: 2, class: _ }
2132 - { id: 3, class: _ }
2133 - { id: 4, class: _ }
2134 - { id: 5, class: _ }
2135 - { id: 6, class: _ }
2136 - { id: 7, class: _ }
2139 liveins: $r0, $r1, $r2, $r3
2145 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2146 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2147 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2148 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2149 %4(s64) = G_MERGE_VALUES %0(s32), %1
2150 %5(s64) = G_MERGE_VALUES %2(s32), %3
2151 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2152 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2153 %6(s1) = G_FCMP floatpred(ole), %4(s64), %5
2154 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ole), [[X]](s64), [[Y]]
2155 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2157 ; SOFT: ADJCALLSTACKDOWN
2158 ; SOFT-DAG: $r0 = COPY [[X0]]
2159 ; SOFT-DAG: $r1 = COPY [[X1]]
2160 ; SOFT-DAG: $r2 = COPY [[Y0]]
2161 ; SOFT-DAG: $r3 = COPY [[Y1]]
2162 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmple, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2163 ; SOFT-DEFAULT: BL{{.*}} &__ledf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2164 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2165 ; SOFT: ADJCALLSTACKUP
2166 ; For aeabi, we just need to truncate the result. The combiner changes the
2167 ; truncation into the following masking sequence.
2168 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2169 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
2170 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2171 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
2172 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2174 %7(s32) = G_ZEXT %6(s1)
2176 ; CHECK: $r0 = COPY [[REXT]]
2177 BX_RET 14, $noreg, implicit $r0
2180 name: test_fcmp_ord_s64
2181 # CHECK-LABEL: name: test_fcmp_ord_s64
2183 # CHECK: legalized: true
2184 regBankSelected: false
2186 tracksRegLiveness: true
2188 - { id: 0, class: _ }
2189 - { id: 1, class: _ }
2190 - { id: 2, class: _ }
2191 - { id: 3, class: _ }
2192 - { id: 4, class: _ }
2193 - { id: 5, class: _ }
2194 - { id: 6, class: _ }
2195 - { id: 7, class: _ }
2198 liveins: $r0, $r1, $r2, $r3
2204 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2205 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2206 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2207 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2208 %4(s64) = G_MERGE_VALUES %0(s32), %1
2209 %5(s64) = G_MERGE_VALUES %2(s32), %3
2210 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2211 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2212 %6(s1) = G_FCMP floatpred(ord), %4(s64), %5
2213 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ord), [[X]](s64), [[Y]]
2215 ; SOFT: ADJCALLSTACKDOWN
2216 ; SOFT-DAG: $r0 = COPY [[X0]]
2217 ; SOFT-DAG: $r1 = COPY [[X1]]
2218 ; SOFT-DAG: $r2 = COPY [[Y0]]
2219 ; SOFT-DAG: $r3 = COPY [[Y1]]
2220 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2221 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2222 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2223 ; SOFT: ADJCALLSTACKUP
2224 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2225 ; SOFT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2227 %7(s32) = G_ZEXT %6(s1)
2228 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2230 ; CHECK: $r0 = COPY [[REXT]]
2231 BX_RET 14, $noreg, implicit $r0
2234 name: test_fcmp_ugt_s64
2235 # CHECK-LABEL: name: test_fcmp_ugt_s64
2237 # CHECK: legalized: true
2238 regBankSelected: false
2240 tracksRegLiveness: true
2242 - { id: 0, class: _ }
2243 - { id: 1, class: _ }
2244 - { id: 2, class: _ }
2245 - { id: 3, class: _ }
2246 - { id: 4, class: _ }
2247 - { id: 5, class: _ }
2248 - { id: 6, class: _ }
2249 - { id: 7, class: _ }
2252 liveins: $r0, $r1, $r2, $r3
2258 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2259 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2260 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2261 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2262 %4(s64) = G_MERGE_VALUES %0(s32), %1
2263 %5(s64) = G_MERGE_VALUES %2(s32), %3
2264 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2265 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2266 %6(s1) = G_FCMP floatpred(ugt), %4(s64), %5
2267 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ugt), [[X]](s64), [[Y]]
2269 ; SOFT: ADJCALLSTACKDOWN
2270 ; SOFT-DAG: $r0 = COPY [[X0]]
2271 ; SOFT-DAG: $r1 = COPY [[X1]]
2272 ; SOFT-DAG: $r2 = COPY [[Y0]]
2273 ; SOFT-DAG: $r3 = COPY [[Y1]]
2274 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmple, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2275 ; SOFT-DEFAULT: BL{{.*}} &__ledf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2276 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2277 ; SOFT: ADJCALLSTACKUP
2278 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2279 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2280 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
2282 %7(s32) = G_ZEXT %6(s1)
2283 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2285 ; CHECK: $r0 = COPY [[REXT]]
2286 BX_RET 14, $noreg, implicit $r0
2289 name: test_fcmp_uge_s64
2290 # CHECK-LABEL: name: test_fcmp_uge_s64
2292 # CHECK: legalized: true
2293 regBankSelected: false
2295 tracksRegLiveness: true
2297 - { id: 0, class: _ }
2298 - { id: 1, class: _ }
2299 - { id: 2, class: _ }
2300 - { id: 3, class: _ }
2301 - { id: 4, class: _ }
2302 - { id: 5, class: _ }
2303 - { id: 6, class: _ }
2304 - { id: 7, class: _ }
2307 liveins: $r0, $r1, $r2, $r3
2313 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2314 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2315 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2316 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2317 %4(s64) = G_MERGE_VALUES %0(s32), %1
2318 %5(s64) = G_MERGE_VALUES %2(s32), %3
2319 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2320 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2321 %6(s1) = G_FCMP floatpred(uge), %4(s64), %5
2322 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uge), [[X]](s64), [[Y]]
2324 ; SOFT: ADJCALLSTACKDOWN
2325 ; SOFT-DAG: $r0 = COPY [[X0]]
2326 ; SOFT-DAG: $r1 = COPY [[X1]]
2327 ; SOFT-DAG: $r2 = COPY [[Y0]]
2328 ; SOFT-DAG: $r3 = COPY [[Y1]]
2329 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2330 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2331 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2332 ; SOFT: ADJCALLSTACKUP
2333 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2334 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2335 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
2337 %7(s32) = G_ZEXT %6(s1)
2338 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2340 ; CHECK: $r0 = COPY [[REXT]]
2341 BX_RET 14, $noreg, implicit $r0
2344 name: test_fcmp_ult_s64
2345 # CHECK-LABEL: name: test_fcmp_ult_s64
2347 # CHECK: legalized: true
2348 regBankSelected: false
2350 tracksRegLiveness: true
2352 - { id: 0, class: _ }
2353 - { id: 1, class: _ }
2354 - { id: 2, class: _ }
2355 - { id: 3, class: _ }
2356 - { id: 4, class: _ }
2357 - { id: 5, class: _ }
2358 - { id: 6, class: _ }
2359 - { id: 7, class: _ }
2362 liveins: $r0, $r1, $r2, $r3
2368 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2369 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2370 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2371 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2372 %4(s64) = G_MERGE_VALUES %0(s32), %1
2373 %5(s64) = G_MERGE_VALUES %2(s32), %3
2374 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2375 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2376 %6(s1) = G_FCMP floatpred(ult), %4(s64), %5
2377 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ult), [[X]](s64), [[Y]]
2379 ; SOFT: ADJCALLSTACKDOWN
2380 ; SOFT-DAG: $r0 = COPY [[X0]]
2381 ; SOFT-DAG: $r1 = COPY [[X1]]
2382 ; SOFT-DAG: $r2 = COPY [[Y0]]
2383 ; SOFT-DAG: $r3 = COPY [[Y1]]
2384 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpge, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2385 ; SOFT-DEFAULT: BL{{.*}} &__gedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2386 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2387 ; SOFT: ADJCALLSTACKUP
2388 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2389 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2390 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
2392 %7(s32) = G_ZEXT %6(s1)
2393 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2395 ; CHECK: $r0 = COPY [[REXT]]
2396 BX_RET 14, $noreg, implicit $r0
2399 name: test_fcmp_ule_s64
2400 # CHECK-LABEL: name: test_fcmp_ule_s64
2402 # CHECK: legalized: true
2403 regBankSelected: false
2405 tracksRegLiveness: true
2407 - { id: 0, class: _ }
2408 - { id: 1, class: _ }
2409 - { id: 2, class: _ }
2410 - { id: 3, class: _ }
2411 - { id: 4, class: _ }
2412 - { id: 5, class: _ }
2413 - { id: 6, class: _ }
2414 - { id: 7, class: _ }
2417 liveins: $r0, $r1, $r2, $r3
2423 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2424 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2425 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2426 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2427 %4(s64) = G_MERGE_VALUES %0(s32), %1
2428 %5(s64) = G_MERGE_VALUES %2(s32), %3
2429 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2430 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2431 %6(s1) = G_FCMP floatpred(ule), %4(s64), %5
2432 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ule), [[X]](s64), [[Y]]
2434 ; SOFT: ADJCALLSTACKDOWN
2435 ; SOFT-DAG: $r0 = COPY [[X0]]
2436 ; SOFT-DAG: $r1 = COPY [[X1]]
2437 ; SOFT-DAG: $r2 = COPY [[Y0]]
2438 ; SOFT-DAG: $r3 = COPY [[Y1]]
2439 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2440 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2441 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2442 ; SOFT: ADJCALLSTACKUP
2443 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2444 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2445 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
2447 %7(s32) = G_ZEXT %6(s1)
2448 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2450 ; CHECK: $r0 = COPY [[REXT]]
2451 BX_RET 14, $noreg, implicit $r0
2454 name: test_fcmp_une_s64
2455 # CHECK-LABEL: name: test_fcmp_une_s64
2457 # CHECK: legalized: true
2458 regBankSelected: false
2460 tracksRegLiveness: true
2462 - { id: 0, class: _ }
2463 - { id: 1, class: _ }
2464 - { id: 2, class: _ }
2465 - { id: 3, class: _ }
2466 - { id: 4, class: _ }
2467 - { id: 5, class: _ }
2468 - { id: 6, class: _ }
2469 - { id: 7, class: _ }
2472 liveins: $r0, $r1, $r2, $r3
2478 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2479 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2480 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2481 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2482 %4(s64) = G_MERGE_VALUES %0(s32), %1
2483 %5(s64) = G_MERGE_VALUES %2(s32), %3
2484 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2485 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2486 %6(s1) = G_FCMP floatpred(une), %4(s64), %5
2487 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(une), [[X]](s64), [[Y]]
2489 ; SOFT: ADJCALLSTACKDOWN
2490 ; SOFT-DAG: $r0 = COPY [[X0]]
2491 ; SOFT-DAG: $r1 = COPY [[X1]]
2492 ; SOFT-DAG: $r2 = COPY [[Y0]]
2493 ; SOFT-DAG: $r3 = COPY [[Y1]]
2494 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2495 ; SOFT-DEFAULT: BL{{.*}} &__nedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2496 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2497 ; SOFT: ADJCALLSTACKUP
2498 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2499 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2500 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
2502 %7(s32) = G_ZEXT %6(s1)
2503 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2505 ; CHECK: $r0 = COPY [[REXT]]
2506 BX_RET 14, $noreg, implicit $r0
2509 name: test_fcmp_uno_s64
2510 # CHECK-LABEL: name: test_fcmp_uno_s64
2512 # CHECK: legalized: true
2513 regBankSelected: false
2515 tracksRegLiveness: true
2517 - { id: 0, class: _ }
2518 - { id: 1, class: _ }
2519 - { id: 2, class: _ }
2520 - { id: 3, class: _ }
2521 - { id: 4, class: _ }
2522 - { id: 5, class: _ }
2523 - { id: 6, class: _ }
2524 - { id: 7, class: _ }
2527 liveins: $r0, $r1, $r2, $r3
2533 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2534 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2535 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2536 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2537 %4(s64) = G_MERGE_VALUES %0(s32), %1
2538 %5(s64) = G_MERGE_VALUES %2(s32), %3
2539 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2540 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2541 %6(s1) = G_FCMP floatpred(uno), %4(s64), %5
2542 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uno), [[X]](s64), [[Y]]
2543 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2545 ; SOFT: ADJCALLSTACKDOWN
2546 ; SOFT-DAG: $r0 = COPY [[X0]]
2547 ; SOFT-DAG: $r1 = COPY [[X1]]
2548 ; SOFT-DAG: $r2 = COPY [[Y0]]
2549 ; SOFT-DAG: $r3 = COPY [[Y1]]
2550 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2551 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2552 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2553 ; SOFT: ADJCALLSTACKUP
2554 ; For aeabi, we just need to truncate the result. The combiner changes the
2555 ; truncation into the following masking sequence.
2556 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2557 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
2558 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2559 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
2560 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2562 %7(s32) = G_ZEXT %6(s1)
2564 ; CHECK: $r0 = COPY [[REXT]]
2565 BX_RET 14, $noreg, implicit $r0
2568 name: test_fcmp_one_s64
2569 # CHECK-LABEL: name: test_fcmp_one_s64
2571 # CHECK: legalized: true
2572 regBankSelected: false
2574 tracksRegLiveness: true
2576 - { id: 0, class: _ }
2577 - { id: 1, class: _ }
2578 - { id: 2, class: _ }
2579 - { id: 3, class: _ }
2580 - { id: 4, class: _ }
2581 - { id: 5, class: _ }
2582 - { id: 6, class: _ }
2583 - { id: 7, class: _ }
2586 liveins: $r0, $r1, $r2, $r3
2592 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2593 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2594 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2595 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2596 %4(s64) = G_MERGE_VALUES %0(s32), %1
2597 %5(s64) = G_MERGE_VALUES %2(s32), %3
2598 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2599 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2600 %6(s1) = G_FCMP floatpred(one), %4(s64), %5
2601 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(one), [[X]](s64), [[Y]]
2602 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2604 ; SOFT: ADJCALLSTACKDOWN
2605 ; SOFT-DAG: $r0 = COPY [[X0]]
2606 ; SOFT-DAG: $r1 = COPY [[X1]]
2607 ; SOFT-DAG: $r2 = COPY [[Y0]]
2608 ; SOFT-DAG: $r3 = COPY [[Y1]]
2609 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2610 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2611 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
2612 ; SOFT: ADJCALLSTACKUP
2613 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2614 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET1]](s32), [[ZERO]]
2616 ; SOFT: ADJCALLSTACKDOWN
2617 ; SOFT-DAG: $r0 = COPY [[X0]]
2618 ; SOFT-DAG: $r1 = COPY [[X1]]
2619 ; SOFT-DAG: $r2 = COPY [[Y0]]
2620 ; SOFT-DAG: $r3 = COPY [[Y1]]
2621 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2622 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2623 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
2624 ; SOFT: ADJCALLSTACKUP
2625 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET2]](s32), [[ZERO]]
2626 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
2627 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
2628 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_OR [[RET1]], [[RET2]]
2629 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
2630 ; The result of the G_OR needs to be truncated, and the combiner turns the
2631 ; truncation into the following masking sequence.
2632 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2633 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[R]], [[MASK]]
2635 %7(s32) = G_ZEXT %6(s1)
2637 ; CHECK: $r0 = COPY [[REXT]]
2638 BX_RET 14, $noreg, implicit $r0
2641 name: test_fcmp_ueq_s64
2642 # CHECK-LABEL: name: test_fcmp_ueq_s64
2644 # CHECK: legalized: true
2645 regBankSelected: false
2647 tracksRegLiveness: true
2649 - { id: 0, class: _ }
2650 - { id: 1, class: _ }
2651 - { id: 2, class: _ }
2652 - { id: 3, class: _ }
2653 - { id: 4, class: _ }
2654 - { id: 5, class: _ }
2655 - { id: 6, class: _ }
2656 - { id: 7, class: _ }
2659 liveins: $r0, $r1, $r2, $r3
2665 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2666 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2667 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2668 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2669 %4(s64) = G_MERGE_VALUES %0(s32), %1
2670 %5(s64) = G_MERGE_VALUES %2(s32), %3
2671 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2672 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2673 %6(s1) = G_FCMP floatpred(ueq), %4(s64), %5
2674 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ueq), [[X]](s64), [[Y]]
2675 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2677 ; SOFT: ADJCALLSTACKDOWN
2678 ; SOFT-DAG: $r0 = COPY [[X0]]
2679 ; SOFT-DAG: $r1 = COPY [[X1]]
2680 ; SOFT-DAG: $r2 = COPY [[Y0]]
2681 ; SOFT-DAG: $r3 = COPY [[Y1]]
2682 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2683 ; SOFT-DEFAULT: BL{{.*}} &__eqdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2684 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
2685 ; SOFT: ADJCALLSTACKUP
2686 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2687 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET1]](s32), [[ZERO]]
2689 ; SOFT: ADJCALLSTACKDOWN
2690 ; SOFT-DAG: $r0 = COPY [[X0]]
2691 ; SOFT-DAG: $r1 = COPY [[X1]]
2692 ; SOFT-DAG: $r2 = COPY [[Y0]]
2693 ; SOFT-DAG: $r3 = COPY [[Y1]]
2694 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2695 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2696 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
2697 ; SOFT: ADJCALLSTACKUP
2698 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET2]](s32), [[ZERO]]
2699 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
2700 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
2701 ; SOFT-AEABI:[[R:%[0-9]+]]:_(s32) = G_OR [[RET1]], [[RET2]]
2702 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
2703 ; The result of the G_OR needs to be truncated, and the combiner turns the
2704 ; truncation into the following masking sequence.
2705 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2706 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[R]], [[MASK]]
2708 %7(s32) = G_ZEXT %6(s1)
2710 ; CHECK: $r0 = COPY [[REXT]]
2711 BX_RET 14, $noreg, implicit $r0