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]]
693 ; SOFT-DAG: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
694 ; SOFT: ADJCALLSTACKDOWN
695 ; SOFT-DAG: $r0 = COPY [[ZERO]]
696 ; SOFT-DAG: $r1 = COPY [[X]]
697 ; SOFT-AEABI: BL{{.*}} &__aeabi_fsub, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
698 ; SOFT-DEFAULT: BL{{.*}} &__subsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
699 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
700 ; SOFT: ADJCALLSTACKUP
703 ; CHECK: $r0 = COPY [[R]]
705 BX_RET 14, $noreg, implicit $r0
708 name: test_fneg_double
709 # CHECK-LABEL: name: test_fneg_double
711 # CHECK: legalized: true
712 regBankSelected: false
714 tracksRegLiveness: true
716 - { id: 0, class: _ }
717 - { id: 1, class: _ }
718 - { id: 2, class: _ }
719 - { id: 3, class: _ }
720 - { id: 4, class: _ }
721 - { id: 5, class: _ }
726 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
727 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
730 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
731 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
732 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FNEG [[X]]
734 ; SOFT-DAG: [[NEGATIVE_ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
735 ; SOFT-DAG: [[POSITIVE_ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
736 ; SOFT: ADJCALLSTACKDOWN
737 ; SOFT-DAG: $r{{[0-1]}} = COPY [[NEGATIVE_ZERO]]
738 ; SOFT-DAG: $r{{[0-1]}} = COPY [[POSITIVE_ZERO]]
739 ; SOFT-DAG: $r{{[2-3]}} = COPY [[X0]]
740 ; SOFT-DAG: $r{{[2-3]}} = COPY [[X1]]
741 ; SOFT-AEABI: BL{{.*}} &__aeabi_dsub, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
742 ; SOFT-DEFAULT: BL{{.*}} &__subdf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
743 ; SOFT: ADJCALLSTACKUP
746 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
747 %4(s32),%5(s32) = G_UNMERGE_VALUES %3(s64)
750 BX_RET 14, $noreg, implicit $r0, implicit $r1
753 name: test_fpext_float_to_double
754 # CHECK-LABEL: name: test_fpext_float_to_double
756 # CHECK: legalized: true
757 regBankSelected: false
759 tracksRegLiveness: true
761 - { id: 0, class: _ }
762 - { id: 1, class: _ }
763 - { id: 2, class: _ }
764 - { id: 3, class: _ }
769 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
771 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FPEXT [[X]]
773 ; SOFT: ADJCALLSTACKDOWN
774 ; SOFT-DAG: $r0 = COPY [[X]]
775 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
776 ; SOFT-DEFAULT: BL{{.*}} &__extendsfdf2, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
777 ; SOFT: [[R0:%[0-9]+]]:_(s32) = COPY $r0
778 ; SOFT: [[R1:%[0-9]+]]:_(s32) = COPY $r1
779 ; SOFT: ADJCALLSTACKUP
781 %1(s64) = G_FPEXT %0(s32)
782 ; HARD: G_UNMERGE_VALUES [[R]](s64)
783 ; SOFT-DAG: $r{{[0-1]}} = COPY [[R0]]
784 ; SOFT-DAG: $r{{[0-1]}} = COPY [[R1]]
785 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
788 BX_RET 14, $noreg, implicit $r0, implicit $r1
791 name: test_fptrunc_double_to_float
792 # CHECK-LABEL: name: test_fptrunc_double_to_float
794 # CHECK: legalized: true
795 regBankSelected: false
797 tracksRegLiveness: true
799 - { id: 0, class: _ }
800 - { id: 1, class: _ }
801 - { id: 2, class: _ }
802 - { id: 3, class: _ }
807 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
808 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
809 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
812 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
813 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTRUNC [[X]]
814 ; SOFT-NOT: G_FPTRUNC
815 ; SOFT: ADJCALLSTACKDOWN
816 ; SOFT-DAG: $r0 = COPY [[X0]]
817 ; SOFT-DAG: $r1 = COPY [[X1]]
818 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2f, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
819 ; SOFT-DEFAULT: BL{{.*}} &__truncdfsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
820 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
821 ; SOFT: ADJCALLSTACKUP
822 ; SOFT-NOT: G_FPTRUNC
823 %3(s32) = G_FPTRUNC %2(s64)
824 ; CHECK: $r0 = COPY [[R]]
826 BX_RET 14, $noreg, implicit $r0
829 name: test_fptosi_float
830 # CHECK-LABEL: name: test_fptosi_float
832 # CHECK: legalized: true
833 regBankSelected: false
835 tracksRegLiveness: true
837 - { id: 0, class: _ }
838 - { id: 1, class: _ }
843 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
845 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOSI [[X]]
847 ; SOFT: ADJCALLSTACKDOWN
848 ; SOFT-DAG: $r0 = COPY [[X]]
849 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2iz, {{.*}}, implicit $r0, implicit-def $r0
850 ; SOFT-DEFAULT: BL{{.*}} &__fixsfsi, {{.*}}, implicit $r0, implicit-def $r0
851 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
852 ; SOFT: ADJCALLSTACKUP
854 %1(s32) = G_FPTOSI %0(s32)
855 ; CHECK: $r0 = COPY [[R]]
857 BX_RET 14, $noreg, implicit $r0
860 name: test_fptosi_double
861 # CHECK-LABEL: name: test_fptosi_double
863 # CHECK: legalized: true
864 regBankSelected: false
866 tracksRegLiveness: true
868 - { id: 0, class: _ }
869 - { id: 1, class: _ }
870 - { id: 2, class: _ }
871 - { id: 3, class: _ }
876 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
877 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
880 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
881 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
882 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOSI [[X]]
884 ; SOFT: ADJCALLSTACKDOWN
885 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
886 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
887 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2iz, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
888 ; SOFT-DEFAULT: BL{{.*}} &__fixdfsi, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
889 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
890 ; SOFT: ADJCALLSTACKUP
892 %3(s32) = G_FPTOSI %2(s64)
893 ; CHECK: $r0 = COPY [[R]](s32)
895 BX_RET 14, $noreg, implicit $r0
898 name: test_fptoui_float
899 # CHECK-LABEL: name: test_fptoui_float
901 # CHECK: legalized: true
902 regBankSelected: false
904 tracksRegLiveness: true
906 - { id: 0, class: _ }
907 - { id: 1, class: _ }
912 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
914 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOUI [[X]]
916 ; SOFT: ADJCALLSTACKDOWN
917 ; SOFT-DAG: $r0 = COPY [[X]]
918 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2uiz, {{.*}}, implicit $r0, implicit-def $r0
919 ; SOFT-DEFAULT: BL{{.*}} &__fixunssfsi, {{.*}}, implicit $r0, implicit-def $r0
920 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
921 ; SOFT: ADJCALLSTACKUP
923 %1(s32) = G_FPTOUI %0(s32)
924 ; CHECK: $r0 = COPY [[R]]
926 BX_RET 14, $noreg, implicit $r0
929 name: test_fptoui_double
930 # CHECK-LABEL: name: test_fptoui_double
932 # CHECK: legalized: true
933 regBankSelected: false
935 tracksRegLiveness: true
937 - { id: 0, class: _ }
938 - { id: 1, class: _ }
939 - { id: 2, class: _ }
940 - { id: 3, class: _ }
945 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
946 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
949 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
950 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
951 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOUI [[X]]
953 ; SOFT: ADJCALLSTACKDOWN
954 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
955 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
956 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2uiz, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
957 ; SOFT-DEFAULT: BL{{.*}} &__fixunsdfsi, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
958 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
959 ; SOFT: ADJCALLSTACKUP
961 %3(s32) = G_FPTOUI %2(s64)
962 ; CHECK: $r0 = COPY [[R]](s32)
964 BX_RET 14, $noreg, implicit $r0
967 name: test_sitofp_float
968 # CHECK-LABEL: name: test_sitofp_float
970 # CHECK: legalized: true
971 regBankSelected: false
973 tracksRegLiveness: true
975 - { id: 0, class: _ }
976 - { id: 1, class: _ }
981 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
983 ; HARD: [[R:%[0-9]+]]:_(s32) = G_SITOFP [[X]]
985 ; SOFT: ADJCALLSTACKDOWN
986 ; SOFT-DAG: $r0 = COPY [[X]]
987 ; SOFT-AEABI: BL{{.*}} &__aeabi_i2f, {{.*}}, implicit $r0, implicit-def $r0
988 ; SOFT-DEFAULT: BL{{.*}} &__floatsisf, {{.*}}, implicit $r0, implicit-def $r0
989 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
990 ; SOFT: ADJCALLSTACKUP
992 %1(s32) = G_SITOFP %0(s32)
993 ; CHECK: $r0 = COPY [[R]]
995 BX_RET 14, $noreg, implicit $r0
998 name: test_sitofp_double
999 # CHECK-LABEL: name: test_sitofp_double
1001 # CHECK: legalized: true
1002 regBankSelected: false
1004 tracksRegLiveness: true
1006 - { id: 0, class: _ }
1007 - { id: 1, class: _ }
1008 - { id: 2, class: _ }
1009 - { id: 3, class: _ }
1014 ; CHECK: [[X:%[0-9]+]]:_(s32) = COPY $r0
1016 ; HARD: [[R:%[0-9]+]]:_(s64) = G_SITOFP [[X]]
1017 ; SOFT-NOT: G_SITOFP
1018 ; SOFT: ADJCALLSTACKDOWN
1019 ; SOFT: $r0 = COPY [[X]]
1020 ; SOFT-AEABI: BL{{.*}} &__aeabi_i2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1021 ; SOFT-DEFAULT: BL{{.*}} &__floatsidf, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1022 ; SOFT-DAG: [[R0:%[0-9]+]]:_(s32) = COPY $r0
1023 ; SOFT-DAG: [[R1:%[0-9]+]]:_(s32) = COPY $r1
1024 ; SOFT: ADJCALLSTACKUP
1025 ; SOFT-NOT: G_SITOFP
1026 %1(s64) = G_SITOFP %0(s32)
1027 ; HARD: [[R0:%[0-9]+]]:_(s32), [[R1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[R]]
1028 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
1029 ; CHECK-DAG: $r0 = COPY [[R0]](s32)
1030 ; CHECK-DAG: $r1 = COPY [[R1]](s32)
1033 BX_RET 14, $noreg, implicit $r0, implicit $r1
1036 name: test_uitofp_float
1037 # CHECK-LABEL: name: test_uitofp_float
1039 # CHECK: legalized: true
1040 regBankSelected: false
1042 tracksRegLiveness: true
1044 - { id: 0, class: _ }
1045 - { id: 1, class: _ }
1050 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1052 ; HARD: [[R:%[0-9]+]]:_(s32) = G_UITOFP [[X]]
1053 ; SOFT-NOT: G_UITOFP
1054 ; SOFT: ADJCALLSTACKDOWN
1055 ; SOFT-DAG: $r0 = COPY [[X]]
1056 ; SOFT-AEABI: BL{{.*}} &__aeabi_ui2f, {{.*}}, implicit $r0, implicit-def $r0
1057 ; SOFT-DEFAULT: BL{{.*}} &__floatunsisf, {{.*}}, implicit $r0, implicit-def $r0
1058 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
1059 ; SOFT: ADJCALLSTACKUP
1060 ; SOFT-NOT: G_UITOFP
1061 %1(s32) = G_UITOFP %0(s32)
1062 ; CHECK: $r0 = COPY [[R]]
1064 BX_RET 14, $noreg, implicit $r0
1067 name: test_uitofp_double
1068 # CHECK-LABEL: name: test_uitofp_double
1070 # CHECK: legalized: true
1071 regBankSelected: false
1073 tracksRegLiveness: true
1075 - { id: 0, class: _ }
1076 - { id: 1, class: _ }
1077 - { id: 2, class: _ }
1078 - { id: 3, class: _ }
1083 ; CHECK: [[X:%[0-9]+]]:_(s32) = COPY $r0
1085 ; HARD: [[R:%[0-9]+]]:_(s64) = G_UITOFP [[X]]
1086 ; SOFT-NOT: G_UITOFP
1087 ; SOFT: ADJCALLSTACKDOWN
1088 ; SOFT: $r0 = COPY [[X]]
1089 ; SOFT-AEABI: BL{{.*}} &__aeabi_ui2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1090 ; SOFT-DEFAULT: BL{{.*}} &__floatunsidf, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1091 ; SOFT-DAG: [[R0:%[0-9]+]]:_(s32) = COPY $r0
1092 ; SOFT-DAG: [[R1:%[0-9]+]]:_(s32) = COPY $r1
1093 ; SOFT: ADJCALLSTACKUP
1094 ; SOFT-NOT: G_UITOFP
1095 %1(s64) = G_UITOFP %0(s32)
1096 ; HARD: [[R0:%[0-9]+]]:_(s32), [[R1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[R]]
1097 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
1098 ; CHECK-DAG: $r0 = COPY [[R0]](s32)
1099 ; CHECK-DAG: $r1 = COPY [[R1]](s32)
1102 BX_RET 14, $noreg, implicit $r0, implicit $r1
1105 name: test_fcmp_true_s32
1106 # CHECK-LABEL: name: test_fcmp_true_s32
1108 # CHECK: legalized: true
1109 regBankSelected: false
1111 tracksRegLiveness: true
1113 - { id: 0, class: _ }
1114 - { id: 1, class: _ }
1115 - { id: 2, class: _ }
1116 - { id: 3, class: _ }
1123 %2(s1) = G_FCMP floatpred(true), %0(s32), %1
1124 %3(s32) = G_ZEXT %2(s1)
1126 BX_RET 14, $noreg, implicit $r0
1127 ; HARD-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1128 ; HARD-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1129 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(true), [[X]](s32), [[Y]]
1130 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1132 ; For soft float we just need to return a '-1' constant, but the truncation
1133 ; to 1 bit is converted by the combiner to the following masking sequence.
1134 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1135 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1136 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]](s32)
1137 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1139 ; CHECK: $r0 = COPY [[REXT]]
1142 name: test_fcmp_false_s32
1143 # CHECK-LABEL: name: test_fcmp_false_s32
1145 # CHECK: legalized: true
1146 regBankSelected: false
1148 tracksRegLiveness: true
1150 - { id: 0, class: _ }
1151 - { id: 1, class: _ }
1152 - { id: 2, class: _ }
1153 - { id: 3, class: _ }
1160 %2(s1) = G_FCMP floatpred(false), %0(s32), %1
1161 %3(s32) = G_ZEXT %2(s1)
1163 BX_RET 14, $noreg, implicit $r0
1164 ; HARD-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1165 ; HARD-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1166 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(false), [[X]](s32), [[Y]]
1167 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1169 ; For soft float we just need to return a '0' constant, but the truncation
1170 ; to 1 bit is converted by the combiner to the following masking sequence.
1171 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1172 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1173 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]](s32)
1174 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1176 ; CHECK: $r0 = COPY [[REXT]]
1179 name: test_fcmp_oeq_s32
1180 # CHECK-LABEL: name: test_fcmp_oeq_s32
1182 # CHECK: legalized: true
1183 regBankSelected: false
1185 tracksRegLiveness: true
1187 - { id: 0, class: _ }
1188 - { id: 1, class: _ }
1189 - { id: 2, class: _ }
1190 - { id: 3, class: _ }
1197 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1198 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1199 %2(s1) = G_FCMP floatpred(oeq), %0(s32), %1
1200 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oeq), [[X]](s32), [[Y]]
1201 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1203 ; SOFT: ADJCALLSTACKDOWN
1204 ; SOFT-DAG: $r0 = COPY [[X]]
1205 ; SOFT-DAG: $r1 = COPY [[Y]]
1206 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1207 ; SOFT-DEFAULT: BL{{.*}} &__eqsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1208 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1209 ; SOFT: ADJCALLSTACKUP
1210 ; For aeabi, we just need to truncate the result. The combiner changes the
1211 ; truncation into the following masking sequence.
1212 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1213 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1214 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1215 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1216 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1217 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1219 %3(s32) = G_ZEXT %2(s1)
1221 ; CHECK: $r0 = COPY [[REXT]]
1222 BX_RET 14, $noreg, implicit $r0
1225 name: test_fcmp_ogt_s32
1226 # CHECK-LABEL: name: test_fcmp_ogt_s32
1228 # CHECK: legalized: true
1229 regBankSelected: false
1231 tracksRegLiveness: true
1233 - { id: 0, class: _ }
1234 - { id: 1, class: _ }
1235 - { id: 2, class: _ }
1236 - { id: 3, class: _ }
1243 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1244 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1245 %2(s1) = G_FCMP floatpred(ogt), %0(s32), %1
1246 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ogt), [[X]](s32), [[Y]]
1247 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1249 ; SOFT: ADJCALLSTACKDOWN
1250 ; SOFT-DAG: $r0 = COPY [[X]]
1251 ; SOFT-DAG: $r1 = COPY [[Y]]
1252 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1253 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1254 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1255 ; SOFT: ADJCALLSTACKUP
1256 ; For aeabi, we just need to truncate the result. The combiner changes the
1257 ; truncation into the following masking sequence.
1258 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1259 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1260 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1261 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1262 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1263 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1265 %3(s32) = G_ZEXT %2(s1)
1267 ; CHECK: $r0 = COPY [[REXT]]
1268 BX_RET 14, $noreg, implicit $r0
1271 name: test_fcmp_oge_s32
1272 # CHECK-LABEL: name: test_fcmp_oge_s32
1274 # CHECK: legalized: true
1275 regBankSelected: false
1277 tracksRegLiveness: true
1279 - { id: 0, class: _ }
1280 - { id: 1, class: _ }
1281 - { id: 2, class: _ }
1282 - { id: 3, class: _ }
1289 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1290 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1291 %2(s1) = G_FCMP floatpred(oge), %0(s32), %1
1292 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oge), [[X]](s32), [[Y]]
1293 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1295 ; SOFT: ADJCALLSTACKDOWN
1296 ; SOFT-DAG: $r0 = COPY [[X]]
1297 ; SOFT-DAG: $r1 = COPY [[Y]]
1298 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpge, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1299 ; SOFT-DEFAULT: BL{{.*}} &__gesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1300 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1301 ; SOFT: ADJCALLSTACKUP
1302 ; For aeabi, we just need to truncate the result. The combiner changes the
1303 ; truncation into the following masking sequence.
1304 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1305 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1306 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1307 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1308 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
1309 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1311 %3(s32) = G_ZEXT %2(s1)
1313 ; CHECK: $r0 = COPY [[REXT]]
1314 BX_RET 14, $noreg, implicit $r0
1317 name: test_fcmp_olt_s32
1318 # CHECK-LABEL: name: test_fcmp_olt_s32
1320 # CHECK: legalized: true
1321 regBankSelected: false
1323 tracksRegLiveness: true
1325 - { id: 0, class: _ }
1326 - { id: 1, class: _ }
1327 - { id: 2, class: _ }
1328 - { id: 3, class: _ }
1335 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1336 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1337 %2(s1) = G_FCMP floatpred(olt), %0(s32), %1
1338 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(olt), [[X]](s32), [[Y]]
1339 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1341 ; SOFT: ADJCALLSTACKDOWN
1342 ; SOFT-DAG: $r0 = COPY [[X]]
1343 ; SOFT-DAG: $r1 = COPY [[Y]]
1344 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1345 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1346 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1347 ; SOFT: ADJCALLSTACKUP
1348 ; For aeabi, we just need to truncate the result. The combiner changes the
1349 ; truncation into the following masking sequence.
1350 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1351 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1352 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1353 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1354 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
1355 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1357 %3(s32) = G_ZEXT %2(s1)
1359 ; CHECK: $r0 = COPY [[REXT]]
1360 BX_RET 14, $noreg, implicit $r0
1363 name: test_fcmp_ole_s32
1364 # CHECK-LABEL: name: test_fcmp_ole_s32
1366 # CHECK: legalized: true
1367 regBankSelected: false
1369 tracksRegLiveness: true
1371 - { id: 0, class: _ }
1372 - { id: 1, class: _ }
1373 - { id: 2, class: _ }
1374 - { id: 3, class: _ }
1381 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1382 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1383 %2(s1) = G_FCMP floatpred(ole), %0(s32), %1
1384 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ole), [[X]](s32), [[Y]]
1385 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1387 ; SOFT: ADJCALLSTACKDOWN
1388 ; SOFT-DAG: $r0 = COPY [[X]]
1389 ; SOFT-DAG: $r1 = COPY [[Y]]
1390 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmple, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1391 ; SOFT-DEFAULT: BL{{.*}} &__lesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1392 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1393 ; SOFT: ADJCALLSTACKUP
1394 ; For aeabi, we just need to truncate the result. The combiner changes the
1395 ; truncation into the following masking sequence.
1396 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1397 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1398 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1399 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1400 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
1401 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1403 %3(s32) = G_ZEXT %2(s1)
1405 ; CHECK: $r0 = COPY [[REXT]]
1406 BX_RET 14, $noreg, implicit $r0
1409 name: test_fcmp_ord_s32
1410 # CHECK-LABEL: name: test_fcmp_ord_s32
1412 # CHECK: legalized: true
1413 regBankSelected: false
1415 tracksRegLiveness: true
1417 - { id: 0, class: _ }
1418 - { id: 1, class: _ }
1419 - { id: 2, class: _ }
1420 - { id: 3, class: _ }
1427 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1428 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1429 %2(s1) = G_FCMP floatpred(ord), %0(s32), %1
1430 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ord), [[X]](s32), [[Y]]
1432 ; SOFT: ADJCALLSTACKDOWN
1433 ; SOFT-DAG: $r0 = COPY [[X]]
1434 ; SOFT-DAG: $r1 = COPY [[Y]]
1435 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1436 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1437 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1438 ; SOFT: ADJCALLSTACKUP
1439 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1440 ; SOFT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1442 %3(s32) = G_ZEXT %2(s1)
1443 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1445 ; CHECK: $r0 = COPY [[REXT]]
1446 BX_RET 14, $noreg, implicit $r0
1449 name: test_fcmp_ugt_s32
1450 # CHECK-LABEL: name: test_fcmp_ugt_s32
1452 # CHECK: legalized: true
1453 regBankSelected: false
1455 tracksRegLiveness: true
1457 - { id: 0, class: _ }
1458 - { id: 1, class: _ }
1459 - { id: 2, class: _ }
1460 - { id: 3, class: _ }
1467 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1468 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1469 %2(s1) = G_FCMP floatpred(ugt), %0(s32), %1
1470 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ugt), [[X]](s32), [[Y]]
1472 ; SOFT: ADJCALLSTACKDOWN
1473 ; SOFT-DAG: $r0 = COPY [[X]]
1474 ; SOFT-DAG: $r1 = COPY [[Y]]
1475 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmple, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1476 ; SOFT-DEFAULT: BL{{.*}} &__lesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1477 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1478 ; SOFT: ADJCALLSTACKUP
1479 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1480 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1481 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1483 %3(s32) = G_ZEXT %2(s1)
1484 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1486 ; CHECK: $r0 = COPY [[REXT]]
1487 BX_RET 14, $noreg, implicit $r0
1490 name: test_fcmp_uge_s32
1491 # CHECK-LABEL: name: test_fcmp_uge_s32
1493 # CHECK: legalized: true
1494 regBankSelected: false
1496 tracksRegLiveness: true
1498 - { id: 0, class: _ }
1499 - { id: 1, class: _ }
1500 - { id: 2, class: _ }
1501 - { id: 3, class: _ }
1508 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1509 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1510 %2(s1) = G_FCMP floatpred(uge), %0(s32), %1
1511 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uge), [[X]](s32), [[Y]]
1513 ; SOFT: ADJCALLSTACKDOWN
1514 ; SOFT-DAG: $r0 = COPY [[X]]
1515 ; SOFT-DAG: $r1 = COPY [[Y]]
1516 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1517 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1518 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1519 ; SOFT: ADJCALLSTACKUP
1520 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1521 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1522 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
1524 %3(s32) = G_ZEXT %2(s1)
1525 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1527 ; CHECK: $r0 = COPY [[REXT]]
1528 BX_RET 14, $noreg, implicit $r0
1531 name: test_fcmp_ult_s32
1532 # CHECK-LABEL: name: test_fcmp_ult_s32
1534 # CHECK: legalized: true
1535 regBankSelected: false
1537 tracksRegLiveness: true
1539 - { id: 0, class: _ }
1540 - { id: 1, class: _ }
1541 - { id: 2, class: _ }
1542 - { id: 3, class: _ }
1549 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1550 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1551 %2(s1) = G_FCMP floatpred(ult), %0(s32), %1
1552 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ult), [[X]](s32), [[Y]]
1554 ; SOFT: ADJCALLSTACKDOWN
1555 ; SOFT-DAG: $r0 = COPY [[X]]
1556 ; SOFT-DAG: $r1 = COPY [[Y]]
1557 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpge, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1558 ; SOFT-DEFAULT: BL{{.*}} &__gesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1559 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1560 ; SOFT: ADJCALLSTACKUP
1561 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1562 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1563 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
1565 %3(s32) = G_ZEXT %2(s1)
1566 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1568 ; CHECK: $r0 = COPY [[REXT]]
1569 BX_RET 14, $noreg, implicit $r0
1572 name: test_fcmp_ule_s32
1573 # CHECK-LABEL: name: test_fcmp_ule_s32
1575 # CHECK: legalized: true
1576 regBankSelected: false
1578 tracksRegLiveness: true
1580 - { id: 0, class: _ }
1581 - { id: 1, class: _ }
1582 - { id: 2, class: _ }
1583 - { id: 3, class: _ }
1590 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1591 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1592 %2(s1) = G_FCMP floatpred(ule), %0(s32), %1
1593 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ule), [[X]](s32), [[Y]]
1595 ; SOFT: ADJCALLSTACKDOWN
1596 ; SOFT-DAG: $r0 = COPY [[X]]
1597 ; SOFT-DAG: $r1 = COPY [[Y]]
1598 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1599 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1600 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1601 ; SOFT: ADJCALLSTACKUP
1602 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1603 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1604 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
1606 %3(s32) = G_ZEXT %2(s1)
1607 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1609 ; CHECK: $r0 = COPY [[REXT]]
1610 BX_RET 14, $noreg, implicit $r0
1613 name: test_fcmp_une_s32
1614 # CHECK-LABEL: name: test_fcmp_une_s32
1616 # CHECK: legalized: true
1617 regBankSelected: false
1619 tracksRegLiveness: true
1621 - { id: 0, class: _ }
1622 - { id: 1, class: _ }
1623 - { id: 2, class: _ }
1624 - { id: 3, class: _ }
1631 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1632 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1633 %2(s1) = G_FCMP floatpred(une), %0(s32), %1
1634 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(une), [[X]](s32), [[Y]]
1636 ; SOFT: ADJCALLSTACKDOWN
1637 ; SOFT-DAG: $r0 = COPY [[X]]
1638 ; SOFT-DAG: $r1 = COPY [[Y]]
1639 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1640 ; SOFT-DEFAULT: BL{{.*}} &__nesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1641 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1642 ; SOFT: ADJCALLSTACKUP
1643 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1644 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1645 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
1647 %3(s32) = G_ZEXT %2(s1)
1648 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1650 ; CHECK: $r0 = COPY [[REXT]]
1651 BX_RET 14, $noreg, implicit $r0
1654 name: test_fcmp_uno_s32
1655 # CHECK-LABEL: name: test_fcmp_uno_s32
1657 # CHECK: legalized: true
1658 regBankSelected: false
1660 tracksRegLiveness: true
1662 - { id: 0, class: _ }
1663 - { id: 1, class: _ }
1664 - { id: 2, class: _ }
1665 - { id: 3, class: _ }
1672 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1673 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1674 %2(s1) = G_FCMP floatpred(uno), %0(s32), %1
1675 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uno), [[X]](s32), [[Y]]
1676 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1678 ; SOFT: ADJCALLSTACKDOWN
1679 ; SOFT-DAG: $r0 = COPY [[X]]
1680 ; SOFT-DAG: $r1 = COPY [[Y]]
1681 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1682 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1683 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1684 ; SOFT: ADJCALLSTACKUP
1685 ; For aeabi, we just need to truncate the result. The combiner changes the
1686 ; truncation into the following masking sequence.
1687 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1688 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1689 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1690 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1691 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
1692 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1694 %3(s32) = G_ZEXT %2(s1)
1696 ; CHECK: $r0 = COPY [[REXT]]
1697 BX_RET 14, $noreg, implicit $r0
1700 name: test_fcmp_one_s32
1701 # CHECK-LABEL: name: test_fcmp_one_s32
1703 # CHECK: legalized: true
1704 regBankSelected: false
1706 tracksRegLiveness: true
1708 - { id: 0, class: _ }
1709 - { id: 1, class: _ }
1710 - { id: 2, class: _ }
1711 - { id: 3, class: _ }
1718 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1719 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1720 %2(s1) = G_FCMP floatpred(one), %0(s32), %1
1721 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(one), [[X]](s32), [[Y]]
1722 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1724 ; SOFT: ADJCALLSTACKDOWN
1725 ; SOFT-DAG: $r0 = COPY [[X]]
1726 ; SOFT-DAG: $r1 = COPY [[Y]]
1727 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1728 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1729 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
1730 ; SOFT: ADJCALLSTACKUP
1731 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1732 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET1]](s32), [[ZERO]]
1734 ; SOFT: ADJCALLSTACKDOWN
1735 ; SOFT-DAG: $r0 = COPY [[X]]
1736 ; SOFT-DAG: $r1 = COPY [[Y]]
1737 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1738 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1739 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
1740 ; SOFT: ADJCALLSTACKUP
1741 ; SOFT-DEFAULT: [[ZERO2:%[0-9]+]]:_(s32) = COPY [[ZERO]]
1742 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET2]](s32), [[ZERO2]]
1743 ; SOFT-AEABI: [[R1EXT:%[0-9]+]]:_(s32) = COPY [[RET1]]
1744 ; SOFT-AEABI: [[R2EXT:%[0-9]+]]:_(s32) = COPY [[RET2]]
1745 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
1746 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
1747 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
1748 ; The result of the G_OR needs to be truncated, and the combiner turns the
1749 ; truncation into the following masking sequence.
1750 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1751 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
1752 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1754 %3(s32) = G_ZEXT %2(s1)
1756 ; CHECK: $r0 = COPY [[REXT]]
1757 BX_RET 14, $noreg, implicit $r0
1760 name: test_fcmp_ueq_s32
1761 # CHECK-LABEL: name: test_fcmp_ueq_s32
1763 # CHECK: legalized: true
1764 regBankSelected: false
1766 tracksRegLiveness: true
1768 - { id: 0, class: _ }
1769 - { id: 1, class: _ }
1770 - { id: 2, class: _ }
1771 - { id: 3, class: _ }
1778 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1779 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1780 %2(s1) = G_FCMP floatpred(ueq), %0(s32), %1
1781 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ueq), [[X]](s32), [[Y]]
1782 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1784 ; SOFT: ADJCALLSTACKDOWN
1785 ; SOFT-DAG: $r0 = COPY [[X]]
1786 ; SOFT-DAG: $r1 = COPY [[Y]]
1787 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1788 ; SOFT-DEFAULT: BL{{.*}} &__eqsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1789 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
1790 ; SOFT: ADJCALLSTACKUP
1791 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1792 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET1]](s32), [[ZERO]]
1794 ; SOFT: ADJCALLSTACKDOWN
1795 ; SOFT-DAG: $r0 = COPY [[X]]
1796 ; SOFT-DAG: $r1 = COPY [[Y]]
1797 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1798 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1799 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
1800 ; SOFT: ADJCALLSTACKUP
1801 ; SOFT-DEFAULT: [[ZERO2:%[0-9]+]]:_(s32) = COPY [[ZERO]]
1802 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET2]](s32), [[ZERO2]]
1803 ; SOFT-AEABI: [[R1EXT:%[0-9]+]]:_(s32) = COPY [[RET1]]
1804 ; SOFT-AEABI: [[R2EXT:%[0-9]+]]:_(s32) = COPY [[RET2]]
1805 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
1806 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
1807 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
1808 ; The result of the G_OR needs to be truncated, and the combiner turns the
1809 ; truncation into the following masking sequence.
1810 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1811 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
1812 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1814 %3(s32) = G_ZEXT %2(s1)
1816 ; CHECK: $r0 = COPY [[REXT]]
1817 BX_RET 14, $noreg, implicit $r0
1820 name: test_fcmp_true_s64
1821 # CHECK-LABEL: name: test_fcmp_true_s64
1823 # CHECK: legalized: true
1824 regBankSelected: false
1826 tracksRegLiveness: true
1828 - { id: 0, class: _ }
1829 - { id: 1, class: _ }
1830 - { id: 2, class: _ }
1831 - { id: 3, class: _ }
1832 - { id: 4, class: _ }
1833 - { id: 5, class: _ }
1834 - { id: 6, class: _ }
1835 - { id: 7, class: _ }
1838 liveins: $r0, $r1, $r2, $r3
1844 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1845 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1846 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1847 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1848 %4(s64) = G_MERGE_VALUES %0(s32), %1
1849 %5(s64) = G_MERGE_VALUES %2(s32), %3
1850 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1851 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1852 %6(s1) = G_FCMP floatpred(true), %4(s64), %5
1853 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(true), [[X]](s64), [[Y]]
1854 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1856 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1857 ; The result needs to be truncated, and the combiner turns the truncation
1858 ; into the following masking sequence.
1859 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1860 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
1861 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1863 %7(s32) = G_ZEXT %6(s1)
1865 ; CHECK: $r0 = COPY [[REXT]]
1866 BX_RET 14, $noreg, implicit $r0
1869 name: test_fcmp_false_s64
1870 # CHECK-LABEL: name: test_fcmp_false_s64
1872 # CHECK: legalized: true
1873 regBankSelected: false
1875 tracksRegLiveness: true
1877 - { id: 0, class: _ }
1878 - { id: 1, class: _ }
1879 - { id: 2, class: _ }
1880 - { id: 3, class: _ }
1881 - { id: 4, class: _ }
1882 - { id: 5, class: _ }
1883 - { id: 6, class: _ }
1884 - { id: 7, class: _ }
1887 liveins: $r0, $r1, $r2, $r3
1893 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1894 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1895 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1896 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1897 %4(s64) = G_MERGE_VALUES %0(s32), %1
1898 %5(s64) = G_MERGE_VALUES %2(s32), %3
1899 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1900 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1901 %6(s1) = G_FCMP floatpred(false), %4(s64), %5
1902 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(false), [[X]](s64), [[Y]]
1903 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1905 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1906 ; The result needs to be truncated, and the combiner turns the truncation
1907 ; into the following masking sequence.
1908 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1909 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
1910 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1913 %7(s32) = G_ZEXT %6(s1)
1915 ; CHECK: $r0 = COPY [[REXT]]
1916 BX_RET 14, $noreg, implicit $r0
1919 name: test_fcmp_oeq_s64
1920 # CHECK-LABEL: name: test_fcmp_oeq_s64
1922 # CHECK: legalized: true
1923 regBankSelected: false
1925 tracksRegLiveness: true
1927 - { id: 0, class: _ }
1928 - { id: 1, class: _ }
1929 - { id: 2, class: _ }
1930 - { id: 3, class: _ }
1931 - { id: 4, class: _ }
1932 - { id: 5, class: _ }
1933 - { id: 6, class: _ }
1934 - { id: 7, class: _ }
1937 liveins: $r0, $r1, $r2, $r3
1943 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1944 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1945 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1946 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1947 %4(s64) = G_MERGE_VALUES %0(s32), %1
1948 %5(s64) = G_MERGE_VALUES %2(s32), %3
1949 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1950 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1951 %6(s1) = G_FCMP floatpred(oeq), %4(s64), %5
1952 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oeq), [[X]](s64), [[Y]]
1953 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1955 ; SOFT: ADJCALLSTACKDOWN
1956 ; SOFT-DAG: $r0 = COPY [[X0]]
1957 ; SOFT-DAG: $r1 = COPY [[X1]]
1958 ; SOFT-DAG: $r2 = COPY [[Y0]]
1959 ; SOFT-DAG: $r3 = COPY [[Y1]]
1960 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1961 ; SOFT-DEFAULT: BL{{.*}} &__eqdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1962 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1963 ; SOFT: ADJCALLSTACKUP
1964 ; For aeabi, we just need to truncate the result. The combiner changes the
1965 ; truncation into the following masking sequence.
1966 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1967 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1968 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1969 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1970 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1971 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1973 %7(s32) = G_ZEXT %6(s1)
1975 ; CHECK: $r0 = COPY [[REXT]]
1976 BX_RET 14, $noreg, implicit $r0
1979 name: test_fcmp_ogt_s64
1980 # CHECK-LABEL: name: test_fcmp_ogt_s64
1982 # CHECK: legalized: true
1983 regBankSelected: false
1985 tracksRegLiveness: true
1987 - { id: 0, class: _ }
1988 - { id: 1, class: _ }
1989 - { id: 2, class: _ }
1990 - { id: 3, class: _ }
1991 - { id: 4, class: _ }
1992 - { id: 5, class: _ }
1993 - { id: 6, class: _ }
1994 - { id: 7, class: _ }
1997 liveins: $r0, $r1, $r2, $r3
2003 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2004 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2005 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2006 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2007 %4(s64) = G_MERGE_VALUES %0(s32), %1
2008 %5(s64) = G_MERGE_VALUES %2(s32), %3
2009 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2010 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2011 %6(s1) = G_FCMP floatpred(ogt), %4(s64), %5
2012 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ogt), [[X]](s64), [[Y]]
2013 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2015 ; SOFT: ADJCALLSTACKDOWN
2016 ; SOFT-DAG: $r0 = COPY [[X0]]
2017 ; SOFT-DAG: $r1 = COPY [[X1]]
2018 ; SOFT-DAG: $r2 = COPY [[Y0]]
2019 ; SOFT-DAG: $r3 = COPY [[Y1]]
2020 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2021 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2022 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2023 ; SOFT: ADJCALLSTACKUP
2024 ; For aeabi, we just need to truncate the result. The combiner changes the
2025 ; truncation into the following masking sequence.
2026 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2027 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2028 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2029 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2030 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
2031 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2033 %7(s32) = G_ZEXT %6(s1)
2035 ; CHECK: $r0 = COPY [[REXT]]
2036 BX_RET 14, $noreg, implicit $r0
2039 name: test_fcmp_oge_s64
2040 # CHECK-LABEL: name: test_fcmp_oge_s64
2042 # CHECK: legalized: true
2043 regBankSelected: false
2045 tracksRegLiveness: true
2047 - { id: 0, class: _ }
2048 - { id: 1, class: _ }
2049 - { id: 2, class: _ }
2050 - { id: 3, class: _ }
2051 - { id: 4, class: _ }
2052 - { id: 5, class: _ }
2053 - { id: 6, class: _ }
2054 - { id: 7, class: _ }
2057 liveins: $r0, $r1, $r2, $r3
2063 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2064 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2065 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2066 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2067 %4(s64) = G_MERGE_VALUES %0(s32), %1
2068 %5(s64) = G_MERGE_VALUES %2(s32), %3
2069 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2070 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2071 %6(s1) = G_FCMP floatpred(oge), %4(s64), %5
2072 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oge), [[X]](s64), [[Y]]
2073 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2075 ; SOFT: ADJCALLSTACKDOWN
2076 ; SOFT-DAG: $r0 = COPY [[X0]]
2077 ; SOFT-DAG: $r1 = COPY [[X1]]
2078 ; SOFT-DAG: $r2 = COPY [[Y0]]
2079 ; SOFT-DAG: $r3 = COPY [[Y1]]
2080 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpge, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2081 ; SOFT-DEFAULT: BL{{.*}} &__gedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2082 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2083 ; SOFT: ADJCALLSTACKUP
2084 ; For aeabi, we just need to truncate the result. The combiner changes the
2085 ; truncation into the following masking sequence.
2086 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2087 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2088 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2089 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2090 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
2091 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2093 %7(s32) = G_ZEXT %6(s1)
2095 ; CHECK: $r0 = COPY [[REXT]]
2096 BX_RET 14, $noreg, implicit $r0
2099 name: test_fcmp_olt_s64
2100 # CHECK-LABEL: name: test_fcmp_olt_s64
2102 # CHECK: legalized: true
2103 regBankSelected: false
2105 tracksRegLiveness: true
2107 - { id: 0, class: _ }
2108 - { id: 1, class: _ }
2109 - { id: 2, class: _ }
2110 - { id: 3, class: _ }
2111 - { id: 4, class: _ }
2112 - { id: 5, class: _ }
2113 - { id: 6, class: _ }
2114 - { id: 7, class: _ }
2117 liveins: $r0, $r1, $r2, $r3
2123 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2124 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2125 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2126 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2127 %4(s64) = G_MERGE_VALUES %0(s32), %1
2128 %5(s64) = G_MERGE_VALUES %2(s32), %3
2129 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2130 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2131 %6(s1) = G_FCMP floatpred(olt), %4(s64), %5
2132 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(olt), [[X]](s64), [[Y]]
2133 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2135 ; SOFT: ADJCALLSTACKDOWN
2136 ; SOFT-DAG: $r0 = COPY [[X0]]
2137 ; SOFT-DAG: $r1 = COPY [[X1]]
2138 ; SOFT-DAG: $r2 = COPY [[Y0]]
2139 ; SOFT-DAG: $r3 = COPY [[Y1]]
2140 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2141 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2142 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2143 ; SOFT: ADJCALLSTACKUP
2144 ; For aeabi, we just need to truncate the result. The combiner changes the
2145 ; truncation into the following masking sequence.
2146 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2147 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2148 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2149 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2150 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
2151 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2153 %7(s32) = G_ZEXT %6(s1)
2155 ; CHECK: $r0 = COPY [[REXT]]
2156 BX_RET 14, $noreg, implicit $r0
2159 name: test_fcmp_ole_s64
2160 # CHECK-LABEL: name: test_fcmp_ole_s64
2162 # CHECK: legalized: true
2163 regBankSelected: false
2165 tracksRegLiveness: true
2167 - { id: 0, class: _ }
2168 - { id: 1, class: _ }
2169 - { id: 2, class: _ }
2170 - { id: 3, class: _ }
2171 - { id: 4, class: _ }
2172 - { id: 5, class: _ }
2173 - { id: 6, class: _ }
2174 - { id: 7, class: _ }
2177 liveins: $r0, $r1, $r2, $r3
2183 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2184 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2185 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2186 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2187 %4(s64) = G_MERGE_VALUES %0(s32), %1
2188 %5(s64) = G_MERGE_VALUES %2(s32), %3
2189 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2190 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2191 %6(s1) = G_FCMP floatpred(ole), %4(s64), %5
2192 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ole), [[X]](s64), [[Y]]
2193 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2195 ; SOFT: ADJCALLSTACKDOWN
2196 ; SOFT-DAG: $r0 = COPY [[X0]]
2197 ; SOFT-DAG: $r1 = COPY [[X1]]
2198 ; SOFT-DAG: $r2 = COPY [[Y0]]
2199 ; SOFT-DAG: $r3 = COPY [[Y1]]
2200 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmple, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2201 ; SOFT-DEFAULT: BL{{.*}} &__ledf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2202 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2203 ; SOFT: ADJCALLSTACKUP
2204 ; For aeabi, we just need to truncate the result. The combiner changes the
2205 ; truncation into the following masking sequence.
2206 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2207 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2208 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2209 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2210 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
2211 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2213 %7(s32) = G_ZEXT %6(s1)
2215 ; CHECK: $r0 = COPY [[REXT]]
2216 BX_RET 14, $noreg, implicit $r0
2219 name: test_fcmp_ord_s64
2220 # CHECK-LABEL: name: test_fcmp_ord_s64
2222 # CHECK: legalized: true
2223 regBankSelected: false
2225 tracksRegLiveness: true
2227 - { id: 0, class: _ }
2228 - { id: 1, class: _ }
2229 - { id: 2, class: _ }
2230 - { id: 3, class: _ }
2231 - { id: 4, class: _ }
2232 - { id: 5, class: _ }
2233 - { id: 6, class: _ }
2234 - { id: 7, class: _ }
2237 liveins: $r0, $r1, $r2, $r3
2243 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2244 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2245 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2246 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2247 %4(s64) = G_MERGE_VALUES %0(s32), %1
2248 %5(s64) = G_MERGE_VALUES %2(s32), %3
2249 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2250 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2251 %6(s1) = G_FCMP floatpred(ord), %4(s64), %5
2252 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ord), [[X]](s64), [[Y]]
2254 ; SOFT: ADJCALLSTACKDOWN
2255 ; SOFT-DAG: $r0 = COPY [[X0]]
2256 ; SOFT-DAG: $r1 = COPY [[X1]]
2257 ; SOFT-DAG: $r2 = COPY [[Y0]]
2258 ; SOFT-DAG: $r3 = COPY [[Y1]]
2259 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2260 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2261 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2262 ; SOFT: ADJCALLSTACKUP
2263 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2264 ; SOFT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2266 %7(s32) = G_ZEXT %6(s1)
2267 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2269 ; CHECK: $r0 = COPY [[REXT]]
2270 BX_RET 14, $noreg, implicit $r0
2273 name: test_fcmp_ugt_s64
2274 # CHECK-LABEL: name: test_fcmp_ugt_s64
2276 # CHECK: legalized: true
2277 regBankSelected: false
2279 tracksRegLiveness: true
2281 - { id: 0, class: _ }
2282 - { id: 1, class: _ }
2283 - { id: 2, class: _ }
2284 - { id: 3, class: _ }
2285 - { id: 4, class: _ }
2286 - { id: 5, class: _ }
2287 - { id: 6, class: _ }
2288 - { id: 7, class: _ }
2291 liveins: $r0, $r1, $r2, $r3
2297 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2298 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2299 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2300 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2301 %4(s64) = G_MERGE_VALUES %0(s32), %1
2302 %5(s64) = G_MERGE_VALUES %2(s32), %3
2303 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2304 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2305 %6(s1) = G_FCMP floatpred(ugt), %4(s64), %5
2306 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ugt), [[X]](s64), [[Y]]
2308 ; SOFT: ADJCALLSTACKDOWN
2309 ; SOFT-DAG: $r0 = COPY [[X0]]
2310 ; SOFT-DAG: $r1 = COPY [[X1]]
2311 ; SOFT-DAG: $r2 = COPY [[Y0]]
2312 ; SOFT-DAG: $r3 = COPY [[Y1]]
2313 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmple, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2314 ; SOFT-DEFAULT: BL{{.*}} &__ledf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2315 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2316 ; SOFT: ADJCALLSTACKUP
2317 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2318 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2319 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
2321 %7(s32) = G_ZEXT %6(s1)
2322 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2324 ; CHECK: $r0 = COPY [[REXT]]
2325 BX_RET 14, $noreg, implicit $r0
2328 name: test_fcmp_uge_s64
2329 # CHECK-LABEL: name: test_fcmp_uge_s64
2331 # CHECK: legalized: true
2332 regBankSelected: false
2334 tracksRegLiveness: true
2336 - { id: 0, class: _ }
2337 - { id: 1, class: _ }
2338 - { id: 2, class: _ }
2339 - { id: 3, class: _ }
2340 - { id: 4, class: _ }
2341 - { id: 5, class: _ }
2342 - { id: 6, class: _ }
2343 - { id: 7, class: _ }
2346 liveins: $r0, $r1, $r2, $r3
2352 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2353 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2354 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2355 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2356 %4(s64) = G_MERGE_VALUES %0(s32), %1
2357 %5(s64) = G_MERGE_VALUES %2(s32), %3
2358 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2359 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2360 %6(s1) = G_FCMP floatpred(uge), %4(s64), %5
2361 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uge), [[X]](s64), [[Y]]
2363 ; SOFT: ADJCALLSTACKDOWN
2364 ; SOFT-DAG: $r0 = COPY [[X0]]
2365 ; SOFT-DAG: $r1 = COPY [[X1]]
2366 ; SOFT-DAG: $r2 = COPY [[Y0]]
2367 ; SOFT-DAG: $r3 = COPY [[Y1]]
2368 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2369 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2370 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2371 ; SOFT: ADJCALLSTACKUP
2372 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2373 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2374 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
2376 %7(s32) = G_ZEXT %6(s1)
2377 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2379 ; CHECK: $r0 = COPY [[REXT]]
2380 BX_RET 14, $noreg, implicit $r0
2383 name: test_fcmp_ult_s64
2384 # CHECK-LABEL: name: test_fcmp_ult_s64
2386 # CHECK: legalized: true
2387 regBankSelected: false
2389 tracksRegLiveness: true
2391 - { id: 0, class: _ }
2392 - { id: 1, class: _ }
2393 - { id: 2, class: _ }
2394 - { id: 3, class: _ }
2395 - { id: 4, class: _ }
2396 - { id: 5, class: _ }
2397 - { id: 6, class: _ }
2398 - { id: 7, class: _ }
2401 liveins: $r0, $r1, $r2, $r3
2407 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2408 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2409 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2410 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2411 %4(s64) = G_MERGE_VALUES %0(s32), %1
2412 %5(s64) = G_MERGE_VALUES %2(s32), %3
2413 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2414 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2415 %6(s1) = G_FCMP floatpred(ult), %4(s64), %5
2416 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ult), [[X]](s64), [[Y]]
2418 ; SOFT: ADJCALLSTACKDOWN
2419 ; SOFT-DAG: $r0 = COPY [[X0]]
2420 ; SOFT-DAG: $r1 = COPY [[X1]]
2421 ; SOFT-DAG: $r2 = COPY [[Y0]]
2422 ; SOFT-DAG: $r3 = COPY [[Y1]]
2423 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpge, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2424 ; SOFT-DEFAULT: BL{{.*}} &__gedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2425 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2426 ; SOFT: ADJCALLSTACKUP
2427 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2428 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2429 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
2431 %7(s32) = G_ZEXT %6(s1)
2432 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2434 ; CHECK: $r0 = COPY [[REXT]]
2435 BX_RET 14, $noreg, implicit $r0
2438 name: test_fcmp_ule_s64
2439 # CHECK-LABEL: name: test_fcmp_ule_s64
2441 # CHECK: legalized: true
2442 regBankSelected: false
2444 tracksRegLiveness: true
2446 - { id: 0, class: _ }
2447 - { id: 1, class: _ }
2448 - { id: 2, class: _ }
2449 - { id: 3, class: _ }
2450 - { id: 4, class: _ }
2451 - { id: 5, class: _ }
2452 - { id: 6, class: _ }
2453 - { id: 7, class: _ }
2456 liveins: $r0, $r1, $r2, $r3
2462 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2463 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2464 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2465 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2466 %4(s64) = G_MERGE_VALUES %0(s32), %1
2467 %5(s64) = G_MERGE_VALUES %2(s32), %3
2468 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2469 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2470 %6(s1) = G_FCMP floatpred(ule), %4(s64), %5
2471 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ule), [[X]](s64), [[Y]]
2473 ; SOFT: ADJCALLSTACKDOWN
2474 ; SOFT-DAG: $r0 = COPY [[X0]]
2475 ; SOFT-DAG: $r1 = COPY [[X1]]
2476 ; SOFT-DAG: $r2 = COPY [[Y0]]
2477 ; SOFT-DAG: $r3 = COPY [[Y1]]
2478 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2479 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2480 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2481 ; SOFT: ADJCALLSTACKUP
2482 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2483 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2484 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
2486 %7(s32) = G_ZEXT %6(s1)
2487 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2489 ; CHECK: $r0 = COPY [[REXT]]
2490 BX_RET 14, $noreg, implicit $r0
2493 name: test_fcmp_une_s64
2494 # CHECK-LABEL: name: test_fcmp_une_s64
2496 # CHECK: legalized: true
2497 regBankSelected: false
2499 tracksRegLiveness: true
2501 - { id: 0, class: _ }
2502 - { id: 1, class: _ }
2503 - { id: 2, class: _ }
2504 - { id: 3, class: _ }
2505 - { id: 4, class: _ }
2506 - { id: 5, class: _ }
2507 - { id: 6, class: _ }
2508 - { id: 7, class: _ }
2511 liveins: $r0, $r1, $r2, $r3
2517 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2518 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2519 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2520 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2521 %4(s64) = G_MERGE_VALUES %0(s32), %1
2522 %5(s64) = G_MERGE_VALUES %2(s32), %3
2523 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2524 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2525 %6(s1) = G_FCMP floatpred(une), %4(s64), %5
2526 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(une), [[X]](s64), [[Y]]
2528 ; SOFT: ADJCALLSTACKDOWN
2529 ; SOFT-DAG: $r0 = COPY [[X0]]
2530 ; SOFT-DAG: $r1 = COPY [[X1]]
2531 ; SOFT-DAG: $r2 = COPY [[Y0]]
2532 ; SOFT-DAG: $r3 = COPY [[Y1]]
2533 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2534 ; SOFT-DEFAULT: BL{{.*}} &__nedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2535 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2536 ; SOFT: ADJCALLSTACKUP
2537 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2538 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2539 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
2541 %7(s32) = G_ZEXT %6(s1)
2542 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2544 ; CHECK: $r0 = COPY [[REXT]]
2545 BX_RET 14, $noreg, implicit $r0
2548 name: test_fcmp_uno_s64
2549 # CHECK-LABEL: name: test_fcmp_uno_s64
2551 # CHECK: legalized: true
2552 regBankSelected: false
2554 tracksRegLiveness: true
2556 - { id: 0, class: _ }
2557 - { id: 1, class: _ }
2558 - { id: 2, class: _ }
2559 - { id: 3, class: _ }
2560 - { id: 4, class: _ }
2561 - { id: 5, class: _ }
2562 - { id: 6, class: _ }
2563 - { id: 7, class: _ }
2566 liveins: $r0, $r1, $r2, $r3
2572 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2573 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2574 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2575 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2576 %4(s64) = G_MERGE_VALUES %0(s32), %1
2577 %5(s64) = G_MERGE_VALUES %2(s32), %3
2578 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2579 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2580 %6(s1) = G_FCMP floatpred(uno), %4(s64), %5
2581 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uno), [[X]](s64), [[Y]]
2582 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2584 ; SOFT: ADJCALLSTACKDOWN
2585 ; SOFT-DAG: $r0 = COPY [[X0]]
2586 ; SOFT-DAG: $r1 = COPY [[X1]]
2587 ; SOFT-DAG: $r2 = COPY [[Y0]]
2588 ; SOFT-DAG: $r3 = COPY [[Y1]]
2589 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2590 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2591 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2592 ; SOFT: ADJCALLSTACKUP
2593 ; For aeabi, we just need to truncate the result. The combiner changes the
2594 ; truncation into the following masking sequence.
2595 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2596 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2597 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2598 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2599 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
2600 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2602 %7(s32) = G_ZEXT %6(s1)
2604 ; CHECK: $r0 = COPY [[REXT]]
2605 BX_RET 14, $noreg, implicit $r0
2608 name: test_fcmp_one_s64
2609 # CHECK-LABEL: name: test_fcmp_one_s64
2611 # CHECK: legalized: true
2612 regBankSelected: false
2614 tracksRegLiveness: true
2616 - { id: 0, class: _ }
2617 - { id: 1, class: _ }
2618 - { id: 2, class: _ }
2619 - { id: 3, class: _ }
2620 - { id: 4, class: _ }
2621 - { id: 5, class: _ }
2622 - { id: 6, class: _ }
2623 - { id: 7, class: _ }
2626 liveins: $r0, $r1, $r2, $r3
2632 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2633 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2634 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2635 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2636 %4(s64) = G_MERGE_VALUES %0(s32), %1
2637 %5(s64) = G_MERGE_VALUES %2(s32), %3
2638 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2639 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2640 %6(s1) = G_FCMP floatpred(one), %4(s64), %5
2641 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(one), [[X]](s64), [[Y]]
2642 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2644 ; SOFT: ADJCALLSTACKDOWN
2645 ; SOFT-DAG: $r0 = COPY [[X0]]
2646 ; SOFT-DAG: $r1 = COPY [[X1]]
2647 ; SOFT-DAG: $r2 = COPY [[Y0]]
2648 ; SOFT-DAG: $r3 = COPY [[Y1]]
2649 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2650 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2651 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
2652 ; SOFT: ADJCALLSTACKUP
2653 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2654 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET1]](s32), [[ZERO]]
2656 ; SOFT: ADJCALLSTACKDOWN
2657 ; SOFT-DAG: $r0 = COPY [[X0]]
2658 ; SOFT-DAG: $r1 = COPY [[X1]]
2659 ; SOFT-DAG: $r2 = COPY [[Y0]]
2660 ; SOFT-DAG: $r3 = COPY [[Y1]]
2661 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2662 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2663 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
2664 ; SOFT: ADJCALLSTACKUP
2665 ; SOFT-DEFAULT: [[ZERO2:%[0-9]+]]:_(s32) = COPY [[ZERO]]
2666 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET2]](s32), [[ZERO2]]
2667 ; SOFT-AEABI: [[R1EXT:%[0-9]+]]:_(s32) = COPY [[RET1]]
2668 ; SOFT-AEABI: [[R2EXT:%[0-9]+]]:_(s32) = COPY [[RET2]]
2669 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
2670 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
2671 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
2672 ; The result of the G_OR needs to be truncated, and the combiner turns the
2673 ; truncation into the following masking sequence.
2674 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2675 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
2676 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2678 %7(s32) = G_ZEXT %6(s1)
2680 ; CHECK: $r0 = COPY [[REXT]]
2681 BX_RET 14, $noreg, implicit $r0
2684 name: test_fcmp_ueq_s64
2685 # CHECK-LABEL: name: test_fcmp_ueq_s64
2687 # CHECK: legalized: true
2688 regBankSelected: false
2690 tracksRegLiveness: true
2692 - { id: 0, class: _ }
2693 - { id: 1, class: _ }
2694 - { id: 2, class: _ }
2695 - { id: 3, class: _ }
2696 - { id: 4, class: _ }
2697 - { id: 5, class: _ }
2698 - { id: 6, class: _ }
2699 - { id: 7, class: _ }
2702 liveins: $r0, $r1, $r2, $r3
2708 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2709 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2710 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2711 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2712 %4(s64) = G_MERGE_VALUES %0(s32), %1
2713 %5(s64) = G_MERGE_VALUES %2(s32), %3
2714 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2715 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2716 %6(s1) = G_FCMP floatpred(ueq), %4(s64), %5
2717 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ueq), [[X]](s64), [[Y]]
2718 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2720 ; SOFT: ADJCALLSTACKDOWN
2721 ; SOFT-DAG: $r0 = COPY [[X0]]
2722 ; SOFT-DAG: $r1 = COPY [[X1]]
2723 ; SOFT-DAG: $r2 = COPY [[Y0]]
2724 ; SOFT-DAG: $r3 = COPY [[Y1]]
2725 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2726 ; SOFT-DEFAULT: BL{{.*}} &__eqdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2727 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
2728 ; SOFT: ADJCALLSTACKUP
2729 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2730 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET1]](s32), [[ZERO]]
2732 ; SOFT: ADJCALLSTACKDOWN
2733 ; SOFT-DAG: $r0 = COPY [[X0]]
2734 ; SOFT-DAG: $r1 = COPY [[X1]]
2735 ; SOFT-DAG: $r2 = COPY [[Y0]]
2736 ; SOFT-DAG: $r3 = COPY [[Y1]]
2737 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2738 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2739 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
2740 ; SOFT: ADJCALLSTACKUP
2741 ; SOFT-DEFAULT: [[ZERO2:%[0-9]+]]:_(s32) = COPY [[ZERO]]
2742 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET2]](s32), [[ZERO2]]
2743 ; SOFT-AEABI: [[R1EXT:%[0-9]+]]:_(s32) = COPY [[RET1]]
2744 ; SOFT-AEABI: [[R2EXT:%[0-9]+]]:_(s32) = COPY [[RET2]]
2745 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
2746 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
2747 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
2748 ; The result of the G_OR needs to be truncated, and the combiner turns the
2749 ; truncation into the following masking sequence.
2750 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2751 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
2752 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2754 %7(s32) = G_ZEXT %6(s1)
2756 ; CHECK: $r0 = COPY [[REXT]]
2757 BX_RET 14, $noreg, implicit $r0