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: [[REXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1122 ; CHECK: $r0 = COPY [[REXT]]
1125 name: test_fcmp_false_s32
1126 # CHECK-LABEL: name: test_fcmp_false_s32
1128 # CHECK: legalized: true
1129 regBankSelected: false
1131 tracksRegLiveness: true
1133 - { id: 0, class: _ }
1134 - { id: 1, class: _ }
1135 - { id: 2, class: _ }
1136 - { id: 3, class: _ }
1143 %2(s1) = G_FCMP floatpred(false), %0(s32), %1
1144 %3(s32) = G_ZEXT %2(s1)
1146 BX_RET 14, $noreg, implicit $r0
1147 ; HARD-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1148 ; HARD-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1149 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(false), [[X]](s32), [[Y]]
1150 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1152 ; For soft float we just need to return a '0' constant, but the truncation
1153 ; to 1 bit is converted by the combiner to the following masking sequence.
1154 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1156 ; CHECK: $r0 = COPY [[REXT]]
1159 name: test_fcmp_oeq_s32
1160 # CHECK-LABEL: name: test_fcmp_oeq_s32
1162 # CHECK: legalized: true
1163 regBankSelected: false
1165 tracksRegLiveness: true
1167 - { id: 0, class: _ }
1168 - { id: 1, class: _ }
1169 - { id: 2, class: _ }
1170 - { id: 3, class: _ }
1177 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1178 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1179 %2(s1) = G_FCMP floatpred(oeq), %0(s32), %1
1180 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oeq), [[X]](s32), [[Y]]
1181 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1183 ; SOFT: ADJCALLSTACKDOWN
1184 ; SOFT-DAG: $r0 = COPY [[X]]
1185 ; SOFT-DAG: $r1 = COPY [[Y]]
1186 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1187 ; SOFT-DEFAULT: BL{{.*}} &__eqsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1188 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1189 ; SOFT: ADJCALLSTACKUP
1190 ; For aeabi, we just need to truncate the result. The combiner changes the
1191 ; truncation into the following masking sequence.
1192 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1193 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1194 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1195 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1196 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1198 %3(s32) = G_ZEXT %2(s1)
1200 ; CHECK: $r0 = COPY [[REXT]]
1201 BX_RET 14, $noreg, implicit $r0
1204 name: test_fcmp_ogt_s32
1205 # CHECK-LABEL: name: test_fcmp_ogt_s32
1207 # CHECK: legalized: true
1208 regBankSelected: false
1210 tracksRegLiveness: true
1212 - { id: 0, class: _ }
1213 - { id: 1, class: _ }
1214 - { id: 2, class: _ }
1215 - { id: 3, class: _ }
1222 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1223 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1224 %2(s1) = G_FCMP floatpred(ogt), %0(s32), %1
1225 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ogt), [[X]](s32), [[Y]]
1226 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1228 ; SOFT: ADJCALLSTACKDOWN
1229 ; SOFT-DAG: $r0 = COPY [[X]]
1230 ; SOFT-DAG: $r1 = COPY [[Y]]
1231 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1232 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1233 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1234 ; SOFT: ADJCALLSTACKUP
1235 ; For aeabi, we just need to truncate the result. The combiner changes the
1236 ; truncation into the following masking sequence.
1237 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1238 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1239 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1240 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1241 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1243 %3(s32) = G_ZEXT %2(s1)
1245 ; CHECK: $r0 = COPY [[REXT]]
1246 BX_RET 14, $noreg, implicit $r0
1249 name: test_fcmp_oge_s32
1250 # CHECK-LABEL: name: test_fcmp_oge_s32
1252 # CHECK: legalized: true
1253 regBankSelected: false
1255 tracksRegLiveness: true
1257 - { id: 0, class: _ }
1258 - { id: 1, class: _ }
1259 - { id: 2, class: _ }
1260 - { id: 3, class: _ }
1267 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1268 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1269 %2(s1) = G_FCMP floatpred(oge), %0(s32), %1
1270 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oge), [[X]](s32), [[Y]]
1271 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1273 ; SOFT: ADJCALLSTACKDOWN
1274 ; SOFT-DAG: $r0 = COPY [[X]]
1275 ; SOFT-DAG: $r1 = COPY [[Y]]
1276 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpge, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1277 ; SOFT-DEFAULT: BL{{.*}} &__gesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1278 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1279 ; SOFT: ADJCALLSTACKUP
1280 ; For aeabi, we just need to truncate the result. The combiner changes the
1281 ; truncation into the following masking sequence.
1282 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1283 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1284 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1285 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
1286 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1288 %3(s32) = G_ZEXT %2(s1)
1290 ; CHECK: $r0 = COPY [[REXT]]
1291 BX_RET 14, $noreg, implicit $r0
1294 name: test_fcmp_olt_s32
1295 # CHECK-LABEL: name: test_fcmp_olt_s32
1297 # CHECK: legalized: true
1298 regBankSelected: false
1300 tracksRegLiveness: true
1302 - { id: 0, class: _ }
1303 - { id: 1, class: _ }
1304 - { id: 2, class: _ }
1305 - { id: 3, class: _ }
1312 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1313 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1314 %2(s1) = G_FCMP floatpred(olt), %0(s32), %1
1315 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(olt), [[X]](s32), [[Y]]
1316 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1318 ; SOFT: ADJCALLSTACKDOWN
1319 ; SOFT-DAG: $r0 = COPY [[X]]
1320 ; SOFT-DAG: $r1 = COPY [[Y]]
1321 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1322 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1323 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1324 ; SOFT: ADJCALLSTACKUP
1325 ; For aeabi, we just need to truncate the result. The combiner changes the
1326 ; truncation into the following masking sequence.
1327 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1328 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1329 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1330 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
1331 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1333 %3(s32) = G_ZEXT %2(s1)
1335 ; CHECK: $r0 = COPY [[REXT]]
1336 BX_RET 14, $noreg, implicit $r0
1339 name: test_fcmp_ole_s32
1340 # CHECK-LABEL: name: test_fcmp_ole_s32
1342 # CHECK: legalized: true
1343 regBankSelected: false
1345 tracksRegLiveness: true
1347 - { id: 0, class: _ }
1348 - { id: 1, class: _ }
1349 - { id: 2, class: _ }
1350 - { id: 3, class: _ }
1357 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1358 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1359 %2(s1) = G_FCMP floatpred(ole), %0(s32), %1
1360 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ole), [[X]](s32), [[Y]]
1361 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1363 ; SOFT: ADJCALLSTACKDOWN
1364 ; SOFT-DAG: $r0 = COPY [[X]]
1365 ; SOFT-DAG: $r1 = COPY [[Y]]
1366 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmple, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1367 ; SOFT-DEFAULT: BL{{.*}} &__lesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1368 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1369 ; SOFT: ADJCALLSTACKUP
1370 ; For aeabi, we just need to truncate the result. The combiner changes the
1371 ; truncation into the following masking sequence.
1372 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1373 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1374 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1375 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
1376 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1378 %3(s32) = G_ZEXT %2(s1)
1380 ; CHECK: $r0 = COPY [[REXT]]
1381 BX_RET 14, $noreg, implicit $r0
1384 name: test_fcmp_ord_s32
1385 # CHECK-LABEL: name: test_fcmp_ord_s32
1387 # CHECK: legalized: true
1388 regBankSelected: false
1390 tracksRegLiveness: true
1392 - { id: 0, class: _ }
1393 - { id: 1, class: _ }
1394 - { id: 2, class: _ }
1395 - { id: 3, class: _ }
1402 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1403 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1404 %2(s1) = G_FCMP floatpred(ord), %0(s32), %1
1405 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ord), [[X]](s32), [[Y]]
1407 ; SOFT: ADJCALLSTACKDOWN
1408 ; SOFT-DAG: $r0 = COPY [[X]]
1409 ; SOFT-DAG: $r1 = COPY [[Y]]
1410 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1411 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1412 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1413 ; SOFT: ADJCALLSTACKUP
1414 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1415 ; SOFT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1417 %3(s32) = G_ZEXT %2(s1)
1418 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1420 ; CHECK: $r0 = COPY [[REXT]]
1421 BX_RET 14, $noreg, implicit $r0
1424 name: test_fcmp_ugt_s32
1425 # CHECK-LABEL: name: test_fcmp_ugt_s32
1427 # CHECK: legalized: true
1428 regBankSelected: false
1430 tracksRegLiveness: true
1432 - { id: 0, class: _ }
1433 - { id: 1, class: _ }
1434 - { id: 2, class: _ }
1435 - { id: 3, class: _ }
1442 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1443 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1444 %2(s1) = G_FCMP floatpred(ugt), %0(s32), %1
1445 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ugt), [[X]](s32), [[Y]]
1447 ; SOFT: ADJCALLSTACKDOWN
1448 ; SOFT-DAG: $r0 = COPY [[X]]
1449 ; SOFT-DAG: $r1 = COPY [[Y]]
1450 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmple, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1451 ; SOFT-DEFAULT: BL{{.*}} &__lesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1452 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1453 ; SOFT: ADJCALLSTACKUP
1454 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1455 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1456 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1458 %3(s32) = G_ZEXT %2(s1)
1459 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1461 ; CHECK: $r0 = COPY [[REXT]]
1462 BX_RET 14, $noreg, implicit $r0
1465 name: test_fcmp_uge_s32
1466 # CHECK-LABEL: name: test_fcmp_uge_s32
1468 # CHECK: legalized: true
1469 regBankSelected: false
1471 tracksRegLiveness: true
1473 - { id: 0, class: _ }
1474 - { id: 1, class: _ }
1475 - { id: 2, class: _ }
1476 - { id: 3, class: _ }
1483 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1484 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1485 %2(s1) = G_FCMP floatpred(uge), %0(s32), %1
1486 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uge), [[X]](s32), [[Y]]
1488 ; SOFT: ADJCALLSTACKDOWN
1489 ; SOFT-DAG: $r0 = COPY [[X]]
1490 ; SOFT-DAG: $r1 = COPY [[Y]]
1491 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1492 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1493 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1494 ; SOFT: ADJCALLSTACKUP
1495 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1496 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1497 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
1499 %3(s32) = G_ZEXT %2(s1)
1500 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1502 ; CHECK: $r0 = COPY [[REXT]]
1503 BX_RET 14, $noreg, implicit $r0
1506 name: test_fcmp_ult_s32
1507 # CHECK-LABEL: name: test_fcmp_ult_s32
1509 # CHECK: legalized: true
1510 regBankSelected: false
1512 tracksRegLiveness: true
1514 - { id: 0, class: _ }
1515 - { id: 1, class: _ }
1516 - { id: 2, class: _ }
1517 - { id: 3, class: _ }
1524 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1525 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1526 %2(s1) = G_FCMP floatpred(ult), %0(s32), %1
1527 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ult), [[X]](s32), [[Y]]
1529 ; SOFT: ADJCALLSTACKDOWN
1530 ; SOFT-DAG: $r0 = COPY [[X]]
1531 ; SOFT-DAG: $r1 = COPY [[Y]]
1532 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpge, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1533 ; SOFT-DEFAULT: BL{{.*}} &__gesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1534 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1535 ; SOFT: ADJCALLSTACKUP
1536 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1537 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1538 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
1540 %3(s32) = G_ZEXT %2(s1)
1541 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1543 ; CHECK: $r0 = COPY [[REXT]]
1544 BX_RET 14, $noreg, implicit $r0
1547 name: test_fcmp_ule_s32
1548 # CHECK-LABEL: name: test_fcmp_ule_s32
1550 # CHECK: legalized: true
1551 regBankSelected: false
1553 tracksRegLiveness: true
1555 - { id: 0, class: _ }
1556 - { id: 1, class: _ }
1557 - { id: 2, class: _ }
1558 - { id: 3, class: _ }
1565 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1566 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1567 %2(s1) = G_FCMP floatpred(ule), %0(s32), %1
1568 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ule), [[X]](s32), [[Y]]
1570 ; SOFT: ADJCALLSTACKDOWN
1571 ; SOFT-DAG: $r0 = COPY [[X]]
1572 ; SOFT-DAG: $r1 = COPY [[Y]]
1573 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1574 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1575 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1576 ; SOFT: ADJCALLSTACKUP
1577 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1578 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1579 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
1581 %3(s32) = G_ZEXT %2(s1)
1582 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1584 ; CHECK: $r0 = COPY [[REXT]]
1585 BX_RET 14, $noreg, implicit $r0
1588 name: test_fcmp_une_s32
1589 # CHECK-LABEL: name: test_fcmp_une_s32
1591 # CHECK: legalized: true
1592 regBankSelected: false
1594 tracksRegLiveness: true
1596 - { id: 0, class: _ }
1597 - { id: 1, class: _ }
1598 - { id: 2, class: _ }
1599 - { id: 3, class: _ }
1606 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1607 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1608 %2(s1) = G_FCMP floatpred(une), %0(s32), %1
1609 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(une), [[X]](s32), [[Y]]
1611 ; SOFT: ADJCALLSTACKDOWN
1612 ; SOFT-DAG: $r0 = COPY [[X]]
1613 ; SOFT-DAG: $r1 = COPY [[Y]]
1614 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1615 ; SOFT-DEFAULT: BL{{.*}} &__nesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1616 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1617 ; SOFT: ADJCALLSTACKUP
1618 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1619 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1620 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
1622 %3(s32) = G_ZEXT %2(s1)
1623 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1625 ; CHECK: $r0 = COPY [[REXT]]
1626 BX_RET 14, $noreg, implicit $r0
1629 name: test_fcmp_uno_s32
1630 # CHECK-LABEL: name: test_fcmp_uno_s32
1632 # CHECK: legalized: true
1633 regBankSelected: false
1635 tracksRegLiveness: true
1637 - { id: 0, class: _ }
1638 - { id: 1, class: _ }
1639 - { id: 2, class: _ }
1640 - { id: 3, class: _ }
1647 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1648 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1649 %2(s1) = G_FCMP floatpred(uno), %0(s32), %1
1650 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uno), [[X]](s32), [[Y]]
1651 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1653 ; SOFT: ADJCALLSTACKDOWN
1654 ; SOFT-DAG: $r0 = COPY [[X]]
1655 ; SOFT-DAG: $r1 = COPY [[Y]]
1656 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1657 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1658 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1659 ; SOFT: ADJCALLSTACKUP
1660 ; For aeabi, we just need to truncate the result. The combiner changes the
1661 ; truncation into the following masking sequence.
1662 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1663 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1664 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1665 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
1666 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1668 %3(s32) = G_ZEXT %2(s1)
1670 ; CHECK: $r0 = COPY [[REXT]]
1671 BX_RET 14, $noreg, implicit $r0
1674 name: test_fcmp_one_s32
1675 # CHECK-LABEL: name: test_fcmp_one_s32
1677 # CHECK: legalized: true
1678 regBankSelected: false
1680 tracksRegLiveness: true
1682 - { id: 0, class: _ }
1683 - { id: 1, class: _ }
1684 - { id: 2, class: _ }
1685 - { id: 3, class: _ }
1692 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1693 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1694 %2(s1) = G_FCMP floatpred(one), %0(s32), %1
1695 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(one), [[X]](s32), [[Y]]
1696 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1698 ; SOFT: ADJCALLSTACKDOWN
1699 ; SOFT-DAG: $r0 = COPY [[X]]
1700 ; SOFT-DAG: $r1 = COPY [[Y]]
1701 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1702 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1703 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
1704 ; SOFT: ADJCALLSTACKUP
1705 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1706 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET1]](s32), [[ZERO]]
1708 ; SOFT: ADJCALLSTACKDOWN
1709 ; SOFT-DAG: $r0 = COPY [[X]]
1710 ; SOFT-DAG: $r1 = COPY [[Y]]
1711 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1712 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1713 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
1714 ; SOFT: ADJCALLSTACKUP
1715 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET2]](s32), [[ZERO]]
1716 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
1717 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
1718 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_OR [[RET1]], [[RET2]]
1719 ; SOFT-DEFAULT:[[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
1720 ; The result of the G_OR needs to be truncated, and the combiner turns the
1721 ; truncation into the following masking sequence.
1722 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1723 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[R]], [[MASK]]
1725 %3(s32) = G_ZEXT %2(s1)
1727 ; CHECK: $r0 = COPY [[REXT]]
1728 BX_RET 14, $noreg, implicit $r0
1731 name: test_fcmp_ueq_s32
1732 # CHECK-LABEL: name: test_fcmp_ueq_s32
1734 # CHECK: legalized: true
1735 regBankSelected: false
1737 tracksRegLiveness: true
1739 - { id: 0, class: _ }
1740 - { id: 1, class: _ }
1741 - { id: 2, class: _ }
1742 - { id: 3, class: _ }
1749 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1750 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1751 %2(s1) = G_FCMP floatpred(ueq), %0(s32), %1
1752 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ueq), [[X]](s32), [[Y]]
1753 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1755 ; SOFT: ADJCALLSTACKDOWN
1756 ; SOFT-DAG: $r0 = COPY [[X]]
1757 ; SOFT-DAG: $r1 = COPY [[Y]]
1758 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1759 ; SOFT-DEFAULT: BL{{.*}} &__eqsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1760 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
1761 ; SOFT: ADJCALLSTACKUP
1762 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1763 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET1]](s32), [[ZERO]]
1765 ; SOFT: ADJCALLSTACKDOWN
1766 ; SOFT-DAG: $r0 = COPY [[X]]
1767 ; SOFT-DAG: $r1 = COPY [[Y]]
1768 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1769 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1770 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
1771 ; SOFT: ADJCALLSTACKUP
1772 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET2]](s32), [[ZERO]]
1773 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
1774 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
1775 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_OR [[RET1]], [[RET2]]
1776 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
1777 ; The result of the G_OR needs to be truncated, and the combiner turns the
1778 ; truncation into the following masking sequence.
1779 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1780 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[R]], [[MASK]]
1782 %3(s32) = G_ZEXT %2(s1)
1784 ; CHECK: $r0 = COPY [[REXT]]
1785 BX_RET 14, $noreg, implicit $r0
1788 name: test_fcmp_true_s64
1789 # CHECK-LABEL: name: test_fcmp_true_s64
1791 # CHECK: legalized: true
1792 regBankSelected: false
1794 tracksRegLiveness: true
1796 - { id: 0, class: _ }
1797 - { id: 1, class: _ }
1798 - { id: 2, class: _ }
1799 - { id: 3, class: _ }
1800 - { id: 4, class: _ }
1801 - { id: 5, class: _ }
1802 - { id: 6, class: _ }
1803 - { id: 7, class: _ }
1806 liveins: $r0, $r1, $r2, $r3
1812 ; HARD-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1813 ; HARD-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1814 ; HARD-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1815 ; HARD-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1816 %4(s64) = G_MERGE_VALUES %0(s32), %1
1817 %5(s64) = G_MERGE_VALUES %2(s32), %3
1818 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1819 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1820 %6(s1) = G_FCMP floatpred(true), %4(s64), %5
1821 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(true), [[X]](s64), [[Y]]
1822 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1824 ; The result needs to be truncated, and the combiner turns the truncation
1825 ; into the following masking sequence.
1826 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1828 %7(s32) = G_ZEXT %6(s1)
1830 ; CHECK: $r0 = COPY [[REXT]]
1831 BX_RET 14, $noreg, implicit $r0
1834 name: test_fcmp_false_s64
1835 # CHECK-LABEL: name: test_fcmp_false_s64
1837 # CHECK: legalized: true
1838 regBankSelected: false
1840 tracksRegLiveness: true
1842 - { id: 0, class: _ }
1843 - { id: 1, class: _ }
1844 - { id: 2, class: _ }
1845 - { id: 3, class: _ }
1846 - { id: 4, class: _ }
1847 - { id: 5, class: _ }
1848 - { id: 6, class: _ }
1849 - { id: 7, class: _ }
1852 liveins: $r0, $r1, $r2, $r3
1858 ; HARD-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1859 ; HARD-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1860 ; HARD-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1861 ; HARD-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1862 %4(s64) = G_MERGE_VALUES %0(s32), %1
1863 %5(s64) = G_MERGE_VALUES %2(s32), %3
1864 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1865 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1866 %6(s1) = G_FCMP floatpred(false), %4(s64), %5
1867 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(false), [[X]](s64), [[Y]]
1868 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1870 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1871 ; The result needs to be truncated, and the combiner turns the truncation
1872 ; into the following masking sequence.
1874 %7(s32) = G_ZEXT %6(s1)
1876 ; CHECK: $r0 = COPY [[REXT]]
1877 BX_RET 14, $noreg, implicit $r0
1880 name: test_fcmp_oeq_s64
1881 # CHECK-LABEL: name: test_fcmp_oeq_s64
1883 # CHECK: legalized: true
1884 regBankSelected: false
1886 tracksRegLiveness: true
1888 - { id: 0, class: _ }
1889 - { id: 1, class: _ }
1890 - { id: 2, class: _ }
1891 - { id: 3, class: _ }
1892 - { id: 4, class: _ }
1893 - { id: 5, class: _ }
1894 - { id: 6, class: _ }
1895 - { id: 7, class: _ }
1898 liveins: $r0, $r1, $r2, $r3
1904 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1905 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1906 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1907 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1908 %4(s64) = G_MERGE_VALUES %0(s32), %1
1909 %5(s64) = G_MERGE_VALUES %2(s32), %3
1910 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1911 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1912 %6(s1) = G_FCMP floatpred(oeq), %4(s64), %5
1913 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oeq), [[X]](s64), [[Y]]
1914 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1916 ; SOFT: ADJCALLSTACKDOWN
1917 ; SOFT-DAG: $r0 = COPY [[X0]]
1918 ; SOFT-DAG: $r1 = COPY [[X1]]
1919 ; SOFT-DAG: $r2 = COPY [[Y0]]
1920 ; SOFT-DAG: $r3 = COPY [[Y1]]
1921 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1922 ; SOFT-DEFAULT: BL{{.*}} &__eqdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1923 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1924 ; SOFT: ADJCALLSTACKUP
1925 ; For aeabi, we just need to truncate the result. The combiner changes the
1926 ; truncation into the following masking sequence.
1927 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1928 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1929 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1930 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1931 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1933 %7(s32) = G_ZEXT %6(s1)
1935 ; CHECK: $r0 = COPY [[REXT]]
1936 BX_RET 14, $noreg, implicit $r0
1939 name: test_fcmp_ogt_s64
1940 # CHECK-LABEL: name: test_fcmp_ogt_s64
1942 # CHECK: legalized: true
1943 regBankSelected: false
1945 tracksRegLiveness: true
1947 - { id: 0, class: _ }
1948 - { id: 1, class: _ }
1949 - { id: 2, class: _ }
1950 - { id: 3, class: _ }
1951 - { id: 4, class: _ }
1952 - { id: 5, class: _ }
1953 - { id: 6, class: _ }
1954 - { id: 7, class: _ }
1957 liveins: $r0, $r1, $r2, $r3
1963 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1964 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1965 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1966 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1967 %4(s64) = G_MERGE_VALUES %0(s32), %1
1968 %5(s64) = G_MERGE_VALUES %2(s32), %3
1969 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1970 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1971 %6(s1) = G_FCMP floatpred(ogt), %4(s64), %5
1972 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ogt), [[X]](s64), [[Y]]
1973 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1975 ; SOFT: ADJCALLSTACKDOWN
1976 ; SOFT-DAG: $r0 = COPY [[X0]]
1977 ; SOFT-DAG: $r1 = COPY [[X1]]
1978 ; SOFT-DAG: $r2 = COPY [[Y0]]
1979 ; SOFT-DAG: $r3 = COPY [[Y1]]
1980 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1981 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1982 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1983 ; SOFT: ADJCALLSTACKUP
1984 ; For aeabi, we just need to truncate the result. The combiner changes the
1985 ; truncation into the following masking sequence.
1986 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1987 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
1988 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1989 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1990 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1992 %7(s32) = G_ZEXT %6(s1)
1994 ; CHECK: $r0 = COPY [[REXT]]
1995 BX_RET 14, $noreg, implicit $r0
1998 name: test_fcmp_oge_s64
1999 # CHECK-LABEL: name: test_fcmp_oge_s64
2001 # CHECK: legalized: true
2002 regBankSelected: false
2004 tracksRegLiveness: true
2006 - { id: 0, class: _ }
2007 - { id: 1, class: _ }
2008 - { id: 2, class: _ }
2009 - { id: 3, class: _ }
2010 - { id: 4, class: _ }
2011 - { id: 5, class: _ }
2012 - { id: 6, class: _ }
2013 - { id: 7, class: _ }
2016 liveins: $r0, $r1, $r2, $r3
2022 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2023 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2024 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2025 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2026 %4(s64) = G_MERGE_VALUES %0(s32), %1
2027 %5(s64) = G_MERGE_VALUES %2(s32), %3
2028 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2029 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2030 %6(s1) = G_FCMP floatpred(oge), %4(s64), %5
2031 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oge), [[X]](s64), [[Y]]
2032 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2034 ; SOFT: ADJCALLSTACKDOWN
2035 ; SOFT-DAG: $r0 = COPY [[X0]]
2036 ; SOFT-DAG: $r1 = COPY [[X1]]
2037 ; SOFT-DAG: $r2 = COPY [[Y0]]
2038 ; SOFT-DAG: $r3 = COPY [[Y1]]
2039 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpge, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2040 ; SOFT-DEFAULT: BL{{.*}} &__gedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2041 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2042 ; SOFT: ADJCALLSTACKUP
2043 ; For aeabi, we just need to truncate the result. The combiner changes the
2044 ; truncation into the following masking sequence.
2045 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2046 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
2047 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2048 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
2049 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2051 %7(s32) = G_ZEXT %6(s1)
2053 ; CHECK: $r0 = COPY [[REXT]]
2054 BX_RET 14, $noreg, implicit $r0
2057 name: test_fcmp_olt_s64
2058 # CHECK-LABEL: name: test_fcmp_olt_s64
2060 # CHECK: legalized: true
2061 regBankSelected: false
2063 tracksRegLiveness: true
2065 - { id: 0, class: _ }
2066 - { id: 1, class: _ }
2067 - { id: 2, class: _ }
2068 - { id: 3, class: _ }
2069 - { id: 4, class: _ }
2070 - { id: 5, class: _ }
2071 - { id: 6, class: _ }
2072 - { id: 7, class: _ }
2075 liveins: $r0, $r1, $r2, $r3
2081 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2082 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2083 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2084 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2085 %4(s64) = G_MERGE_VALUES %0(s32), %1
2086 %5(s64) = G_MERGE_VALUES %2(s32), %3
2087 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2088 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2089 %6(s1) = G_FCMP floatpred(olt), %4(s64), %5
2090 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(olt), [[X]](s64), [[Y]]
2091 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2093 ; SOFT: ADJCALLSTACKDOWN
2094 ; SOFT-DAG: $r0 = COPY [[X0]]
2095 ; SOFT-DAG: $r1 = COPY [[X1]]
2096 ; SOFT-DAG: $r2 = COPY [[Y0]]
2097 ; SOFT-DAG: $r3 = COPY [[Y1]]
2098 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2099 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2100 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2101 ; SOFT: ADJCALLSTACKUP
2102 ; For aeabi, we just need to truncate the result. The combiner changes the
2103 ; truncation into the following masking sequence.
2104 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2105 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
2106 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2107 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
2108 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2110 %7(s32) = G_ZEXT %6(s1)
2112 ; CHECK: $r0 = COPY [[REXT]]
2113 BX_RET 14, $noreg, implicit $r0
2116 name: test_fcmp_ole_s64
2117 # CHECK-LABEL: name: test_fcmp_ole_s64
2119 # CHECK: legalized: true
2120 regBankSelected: false
2122 tracksRegLiveness: true
2124 - { id: 0, class: _ }
2125 - { id: 1, class: _ }
2126 - { id: 2, class: _ }
2127 - { id: 3, class: _ }
2128 - { id: 4, class: _ }
2129 - { id: 5, class: _ }
2130 - { id: 6, class: _ }
2131 - { id: 7, class: _ }
2134 liveins: $r0, $r1, $r2, $r3
2140 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2141 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2142 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2143 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2144 %4(s64) = G_MERGE_VALUES %0(s32), %1
2145 %5(s64) = G_MERGE_VALUES %2(s32), %3
2146 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2147 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2148 %6(s1) = G_FCMP floatpred(ole), %4(s64), %5
2149 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ole), [[X]](s64), [[Y]]
2150 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2152 ; SOFT: ADJCALLSTACKDOWN
2153 ; SOFT-DAG: $r0 = COPY [[X0]]
2154 ; SOFT-DAG: $r1 = COPY [[X1]]
2155 ; SOFT-DAG: $r2 = COPY [[Y0]]
2156 ; SOFT-DAG: $r3 = COPY [[Y1]]
2157 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmple, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2158 ; SOFT-DEFAULT: BL{{.*}} &__ledf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2159 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2160 ; SOFT: ADJCALLSTACKUP
2161 ; For aeabi, we just need to truncate the result. The combiner changes the
2162 ; truncation into the following masking sequence.
2163 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2164 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
2165 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2166 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
2167 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2169 %7(s32) = G_ZEXT %6(s1)
2171 ; CHECK: $r0 = COPY [[REXT]]
2172 BX_RET 14, $noreg, implicit $r0
2175 name: test_fcmp_ord_s64
2176 # CHECK-LABEL: name: test_fcmp_ord_s64
2178 # CHECK: legalized: true
2179 regBankSelected: false
2181 tracksRegLiveness: true
2183 - { id: 0, class: _ }
2184 - { id: 1, class: _ }
2185 - { id: 2, class: _ }
2186 - { id: 3, class: _ }
2187 - { id: 4, class: _ }
2188 - { id: 5, class: _ }
2189 - { id: 6, class: _ }
2190 - { id: 7, class: _ }
2193 liveins: $r0, $r1, $r2, $r3
2199 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2200 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2201 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2202 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2203 %4(s64) = G_MERGE_VALUES %0(s32), %1
2204 %5(s64) = G_MERGE_VALUES %2(s32), %3
2205 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2206 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2207 %6(s1) = G_FCMP floatpred(ord), %4(s64), %5
2208 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ord), [[X]](s64), [[Y]]
2210 ; SOFT: ADJCALLSTACKDOWN
2211 ; SOFT-DAG: $r0 = COPY [[X0]]
2212 ; SOFT-DAG: $r1 = COPY [[X1]]
2213 ; SOFT-DAG: $r2 = COPY [[Y0]]
2214 ; SOFT-DAG: $r3 = COPY [[Y1]]
2215 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2216 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2217 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2218 ; SOFT: ADJCALLSTACKUP
2219 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2220 ; SOFT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2222 %7(s32) = G_ZEXT %6(s1)
2223 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2225 ; CHECK: $r0 = COPY [[REXT]]
2226 BX_RET 14, $noreg, implicit $r0
2229 name: test_fcmp_ugt_s64
2230 # CHECK-LABEL: name: test_fcmp_ugt_s64
2232 # CHECK: legalized: true
2233 regBankSelected: false
2235 tracksRegLiveness: true
2237 - { id: 0, class: _ }
2238 - { id: 1, class: _ }
2239 - { id: 2, class: _ }
2240 - { id: 3, class: _ }
2241 - { id: 4, class: _ }
2242 - { id: 5, class: _ }
2243 - { id: 6, class: _ }
2244 - { id: 7, class: _ }
2247 liveins: $r0, $r1, $r2, $r3
2253 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2254 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2255 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2256 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2257 %4(s64) = G_MERGE_VALUES %0(s32), %1
2258 %5(s64) = G_MERGE_VALUES %2(s32), %3
2259 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2260 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2261 %6(s1) = G_FCMP floatpred(ugt), %4(s64), %5
2262 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ugt), [[X]](s64), [[Y]]
2264 ; SOFT: ADJCALLSTACKDOWN
2265 ; SOFT-DAG: $r0 = COPY [[X0]]
2266 ; SOFT-DAG: $r1 = COPY [[X1]]
2267 ; SOFT-DAG: $r2 = COPY [[Y0]]
2268 ; SOFT-DAG: $r3 = COPY [[Y1]]
2269 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmple, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2270 ; SOFT-DEFAULT: BL{{.*}} &__ledf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2271 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2272 ; SOFT: ADJCALLSTACKUP
2273 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2274 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2275 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
2277 %7(s32) = G_ZEXT %6(s1)
2278 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2280 ; CHECK: $r0 = COPY [[REXT]]
2281 BX_RET 14, $noreg, implicit $r0
2284 name: test_fcmp_uge_s64
2285 # CHECK-LABEL: name: test_fcmp_uge_s64
2287 # CHECK: legalized: true
2288 regBankSelected: false
2290 tracksRegLiveness: true
2292 - { id: 0, class: _ }
2293 - { id: 1, class: _ }
2294 - { id: 2, class: _ }
2295 - { id: 3, class: _ }
2296 - { id: 4, class: _ }
2297 - { id: 5, class: _ }
2298 - { id: 6, class: _ }
2299 - { id: 7, class: _ }
2302 liveins: $r0, $r1, $r2, $r3
2308 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2309 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2310 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2311 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2312 %4(s64) = G_MERGE_VALUES %0(s32), %1
2313 %5(s64) = G_MERGE_VALUES %2(s32), %3
2314 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2315 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2316 %6(s1) = G_FCMP floatpred(uge), %4(s64), %5
2317 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uge), [[X]](s64), [[Y]]
2319 ; SOFT: ADJCALLSTACKDOWN
2320 ; SOFT-DAG: $r0 = COPY [[X0]]
2321 ; SOFT-DAG: $r1 = COPY [[X1]]
2322 ; SOFT-DAG: $r2 = COPY [[Y0]]
2323 ; SOFT-DAG: $r3 = COPY [[Y1]]
2324 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2325 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2326 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2327 ; SOFT: ADJCALLSTACKUP
2328 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2329 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2330 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
2332 %7(s32) = G_ZEXT %6(s1)
2333 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2335 ; CHECK: $r0 = COPY [[REXT]]
2336 BX_RET 14, $noreg, implicit $r0
2339 name: test_fcmp_ult_s64
2340 # CHECK-LABEL: name: test_fcmp_ult_s64
2342 # CHECK: legalized: true
2343 regBankSelected: false
2345 tracksRegLiveness: true
2347 - { id: 0, class: _ }
2348 - { id: 1, class: _ }
2349 - { id: 2, class: _ }
2350 - { id: 3, class: _ }
2351 - { id: 4, class: _ }
2352 - { id: 5, class: _ }
2353 - { id: 6, class: _ }
2354 - { id: 7, class: _ }
2357 liveins: $r0, $r1, $r2, $r3
2363 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2364 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2365 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2366 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2367 %4(s64) = G_MERGE_VALUES %0(s32), %1
2368 %5(s64) = G_MERGE_VALUES %2(s32), %3
2369 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2370 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2371 %6(s1) = G_FCMP floatpred(ult), %4(s64), %5
2372 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ult), [[X]](s64), [[Y]]
2374 ; SOFT: ADJCALLSTACKDOWN
2375 ; SOFT-DAG: $r0 = COPY [[X0]]
2376 ; SOFT-DAG: $r1 = COPY [[X1]]
2377 ; SOFT-DAG: $r2 = COPY [[Y0]]
2378 ; SOFT-DAG: $r3 = COPY [[Y1]]
2379 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpge, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2380 ; SOFT-DEFAULT: BL{{.*}} &__gedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2381 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2382 ; SOFT: ADJCALLSTACKUP
2383 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2384 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2385 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
2387 %7(s32) = G_ZEXT %6(s1)
2388 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2390 ; CHECK: $r0 = COPY [[REXT]]
2391 BX_RET 14, $noreg, implicit $r0
2394 name: test_fcmp_ule_s64
2395 # CHECK-LABEL: name: test_fcmp_ule_s64
2397 # CHECK: legalized: true
2398 regBankSelected: false
2400 tracksRegLiveness: true
2402 - { id: 0, class: _ }
2403 - { id: 1, class: _ }
2404 - { id: 2, class: _ }
2405 - { id: 3, class: _ }
2406 - { id: 4, class: _ }
2407 - { id: 5, class: _ }
2408 - { id: 6, class: _ }
2409 - { id: 7, class: _ }
2412 liveins: $r0, $r1, $r2, $r3
2418 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2419 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2420 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2421 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2422 %4(s64) = G_MERGE_VALUES %0(s32), %1
2423 %5(s64) = G_MERGE_VALUES %2(s32), %3
2424 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2425 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2426 %6(s1) = G_FCMP floatpred(ule), %4(s64), %5
2427 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ule), [[X]](s64), [[Y]]
2429 ; SOFT: ADJCALLSTACKDOWN
2430 ; SOFT-DAG: $r0 = COPY [[X0]]
2431 ; SOFT-DAG: $r1 = COPY [[X1]]
2432 ; SOFT-DAG: $r2 = COPY [[Y0]]
2433 ; SOFT-DAG: $r3 = COPY [[Y1]]
2434 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2435 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2436 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2437 ; SOFT: ADJCALLSTACKUP
2438 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2439 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2440 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
2442 %7(s32) = G_ZEXT %6(s1)
2443 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2445 ; CHECK: $r0 = COPY [[REXT]]
2446 BX_RET 14, $noreg, implicit $r0
2449 name: test_fcmp_une_s64
2450 # CHECK-LABEL: name: test_fcmp_une_s64
2452 # CHECK: legalized: true
2453 regBankSelected: false
2455 tracksRegLiveness: true
2457 - { id: 0, class: _ }
2458 - { id: 1, class: _ }
2459 - { id: 2, class: _ }
2460 - { id: 3, class: _ }
2461 - { id: 4, class: _ }
2462 - { id: 5, class: _ }
2463 - { id: 6, class: _ }
2464 - { id: 7, class: _ }
2467 liveins: $r0, $r1, $r2, $r3
2473 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2474 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2475 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2476 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2477 %4(s64) = G_MERGE_VALUES %0(s32), %1
2478 %5(s64) = G_MERGE_VALUES %2(s32), %3
2479 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2480 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2481 %6(s1) = G_FCMP floatpred(une), %4(s64), %5
2482 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(une), [[X]](s64), [[Y]]
2484 ; SOFT: ADJCALLSTACKDOWN
2485 ; SOFT-DAG: $r0 = COPY [[X0]]
2486 ; SOFT-DAG: $r1 = COPY [[X1]]
2487 ; SOFT-DAG: $r2 = COPY [[Y0]]
2488 ; SOFT-DAG: $r3 = COPY [[Y1]]
2489 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2490 ; SOFT-DEFAULT: BL{{.*}} &__nedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2491 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2492 ; SOFT: ADJCALLSTACKUP
2493 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2494 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2495 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
2497 %7(s32) = G_ZEXT %6(s1)
2498 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2500 ; CHECK: $r0 = COPY [[REXT]]
2501 BX_RET 14, $noreg, implicit $r0
2504 name: test_fcmp_uno_s64
2505 # CHECK-LABEL: name: test_fcmp_uno_s64
2507 # CHECK: legalized: true
2508 regBankSelected: false
2510 tracksRegLiveness: true
2512 - { id: 0, class: _ }
2513 - { id: 1, class: _ }
2514 - { id: 2, class: _ }
2515 - { id: 3, class: _ }
2516 - { id: 4, class: _ }
2517 - { id: 5, class: _ }
2518 - { id: 6, class: _ }
2519 - { id: 7, class: _ }
2522 liveins: $r0, $r1, $r2, $r3
2528 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2529 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2530 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2531 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2532 %4(s64) = G_MERGE_VALUES %0(s32), %1
2533 %5(s64) = G_MERGE_VALUES %2(s32), %3
2534 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2535 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2536 %6(s1) = G_FCMP floatpred(uno), %4(s64), %5
2537 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uno), [[X]](s64), [[Y]]
2538 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2540 ; SOFT: ADJCALLSTACKDOWN
2541 ; SOFT-DAG: $r0 = COPY [[X0]]
2542 ; SOFT-DAG: $r1 = COPY [[X1]]
2543 ; SOFT-DAG: $r2 = COPY [[Y0]]
2544 ; SOFT-DAG: $r3 = COPY [[Y1]]
2545 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2546 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2547 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2548 ; SOFT: ADJCALLSTACKUP
2549 ; For aeabi, we just need to truncate the result. The combiner changes the
2550 ; truncation into the following masking sequence.
2551 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2552 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RET]], [[MASK]]
2553 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2554 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
2555 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2557 %7(s32) = G_ZEXT %6(s1)
2559 ; CHECK: $r0 = COPY [[REXT]]
2560 BX_RET 14, $noreg, implicit $r0
2563 name: test_fcmp_one_s64
2564 # CHECK-LABEL: name: test_fcmp_one_s64
2566 # CHECK: legalized: true
2567 regBankSelected: false
2569 tracksRegLiveness: true
2571 - { id: 0, class: _ }
2572 - { id: 1, class: _ }
2573 - { id: 2, class: _ }
2574 - { id: 3, class: _ }
2575 - { id: 4, class: _ }
2576 - { id: 5, class: _ }
2577 - { id: 6, class: _ }
2578 - { id: 7, class: _ }
2581 liveins: $r0, $r1, $r2, $r3
2587 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2588 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2589 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2590 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2591 %4(s64) = G_MERGE_VALUES %0(s32), %1
2592 %5(s64) = G_MERGE_VALUES %2(s32), %3
2593 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2594 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2595 %6(s1) = G_FCMP floatpred(one), %4(s64), %5
2596 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(one), [[X]](s64), [[Y]]
2597 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2599 ; SOFT: ADJCALLSTACKDOWN
2600 ; SOFT-DAG: $r0 = COPY [[X0]]
2601 ; SOFT-DAG: $r1 = COPY [[X1]]
2602 ; SOFT-DAG: $r2 = COPY [[Y0]]
2603 ; SOFT-DAG: $r3 = COPY [[Y1]]
2604 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2605 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2606 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
2607 ; SOFT: ADJCALLSTACKUP
2608 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2609 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET1]](s32), [[ZERO]]
2611 ; SOFT: ADJCALLSTACKDOWN
2612 ; SOFT-DAG: $r0 = COPY [[X0]]
2613 ; SOFT-DAG: $r1 = COPY [[X1]]
2614 ; SOFT-DAG: $r2 = COPY [[Y0]]
2615 ; SOFT-DAG: $r3 = COPY [[Y1]]
2616 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2617 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2618 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
2619 ; SOFT: ADJCALLSTACKUP
2620 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET2]](s32), [[ZERO]]
2621 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
2622 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
2623 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_OR [[RET1]], [[RET2]]
2624 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
2625 ; The result of the G_OR needs to be truncated, and the combiner turns the
2626 ; truncation into the following masking sequence.
2627 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2628 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[R]], [[MASK]]
2630 %7(s32) = G_ZEXT %6(s1)
2632 ; CHECK: $r0 = COPY [[REXT]]
2633 BX_RET 14, $noreg, implicit $r0
2636 name: test_fcmp_ueq_s64
2637 # CHECK-LABEL: name: test_fcmp_ueq_s64
2639 # CHECK: legalized: true
2640 regBankSelected: false
2642 tracksRegLiveness: true
2644 - { id: 0, class: _ }
2645 - { id: 1, class: _ }
2646 - { id: 2, class: _ }
2647 - { id: 3, class: _ }
2648 - { id: 4, class: _ }
2649 - { id: 5, class: _ }
2650 - { id: 6, class: _ }
2651 - { id: 7, class: _ }
2654 liveins: $r0, $r1, $r2, $r3
2660 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2661 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2662 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2663 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2664 %4(s64) = G_MERGE_VALUES %0(s32), %1
2665 %5(s64) = G_MERGE_VALUES %2(s32), %3
2666 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2667 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2668 %6(s1) = G_FCMP floatpred(ueq), %4(s64), %5
2669 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ueq), [[X]](s64), [[Y]]
2670 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2672 ; SOFT: ADJCALLSTACKDOWN
2673 ; SOFT-DAG: $r0 = COPY [[X0]]
2674 ; SOFT-DAG: $r1 = COPY [[X1]]
2675 ; SOFT-DAG: $r2 = COPY [[Y0]]
2676 ; SOFT-DAG: $r3 = COPY [[Y1]]
2677 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2678 ; SOFT-DEFAULT: BL{{.*}} &__eqdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2679 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
2680 ; SOFT: ADJCALLSTACKUP
2681 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2682 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET1]](s32), [[ZERO]]
2684 ; SOFT: ADJCALLSTACKDOWN
2685 ; SOFT-DAG: $r0 = COPY [[X0]]
2686 ; SOFT-DAG: $r1 = COPY [[X1]]
2687 ; SOFT-DAG: $r2 = COPY [[Y0]]
2688 ; SOFT-DAG: $r3 = COPY [[Y1]]
2689 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2690 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2691 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
2692 ; SOFT: ADJCALLSTACKUP
2693 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET2]](s32), [[ZERO]]
2694 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
2695 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
2696 ; SOFT-AEABI:[[R:%[0-9]+]]:_(s32) = G_OR [[RET1]], [[RET2]]
2697 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
2698 ; The result of the G_OR needs to be truncated, and the combiner turns the
2699 ; truncation into the following masking sequence.
2700 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2701 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[R]], [[MASK]]
2703 %7(s32) = G_ZEXT %6(s1)
2705 ; CHECK: $r0 = COPY [[REXT]]
2706 BX_RET 14, $noreg, implicit $r0