1 # RUN: llc -O0 -mtriple arm-linux-gnueabihf -mattr=+vfp2 -float-abi=hard -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix HARD
2 # RUN: llc -O0 -mtriple arm-linux-gnueabi -mattr=+vfp2,+soft-float -float-abi=soft -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix SOFT -check-prefix SOFT-AEABI
3 # RUN: llc -O0 -mtriple arm-linux-gnu -mattr=+soft-float -float-abi=soft -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix SOFT -check-prefix SOFT-DEFAULT
4 # RUN: llc -O0 -mtriple thumb-linux-gnueabihf -mattr=+v6t2,+vfp2 -float-abi=hard -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix HARD
5 # RUN: llc -O0 -mtriple thumb-linux-gnueabi -mattr=+v6t2,+vfp2,+soft-float -float-abi=soft -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix SOFT -check-prefix SOFT-AEABI
6 # RUN: llc -O0 -mtriple thumb-linux-gnu -mattr=+v6t2,+soft-float -float-abi=soft -run-pass=legalizer %s -o - | FileCheck %s -check-prefix CHECK -check-prefix SOFT -check-prefix SOFT-DEFAULT
8 define void @test_frem_float() { ret void }
9 define void @test_frem_double() { ret void }
11 define void @test_fpow_float() { ret void }
12 define void @test_fpow_double() { ret void }
14 define void @test_fadd_float() { ret void }
15 define void @test_fadd_double() { ret void }
17 define void @test_fsub_float() { ret void }
18 define void @test_fsub_double() { ret void }
20 define void @test_fmul_float() { ret void }
21 define void @test_fmul_double() { ret void }
23 define void @test_fdiv_float() { ret void }
24 define void @test_fdiv_double() { ret void }
26 define void @test_fconstant_float() { ret void }
27 define void @test_fconstant_double() { ret void }
29 define void @test_fneg_float() { ret void }
30 define void @test_fneg_double() { ret void }
32 define void @test_fpext_float_to_double() { ret void }
33 define void @test_fptrunc_double_to_float() { ret void }
35 define void @test_fptosi_float() { ret void }
36 define void @test_fptosi_double() { ret void }
37 define void @test_fptoui_float() { ret void }
38 define void @test_fptoui_double() { ret void }
40 define void @test_sitofp_float() { ret void }
41 define void @test_sitofp_double() { ret void }
42 define void @test_uitofp_float() { ret void }
43 define void @test_uitofp_double() { ret void }
45 define void @test_fcmp_true_s32() { ret void }
46 define void @test_fcmp_false_s32() { ret void }
48 define void @test_fcmp_oeq_s32() { ret void }
49 define void @test_fcmp_ogt_s32() { ret void }
50 define void @test_fcmp_oge_s32() { ret void }
51 define void @test_fcmp_olt_s32() { ret void }
52 define void @test_fcmp_ole_s32() { ret void }
53 define void @test_fcmp_ord_s32() { ret void }
54 define void @test_fcmp_ugt_s32() { ret void }
55 define void @test_fcmp_uge_s32() { ret void }
56 define void @test_fcmp_ult_s32() { ret void }
57 define void @test_fcmp_ule_s32() { ret void }
58 define void @test_fcmp_une_s32() { ret void }
59 define void @test_fcmp_uno_s32() { ret void }
61 define void @test_fcmp_one_s32() { ret void }
62 define void @test_fcmp_ueq_s32() { ret void }
64 define void @test_fcmp_true_s64() { ret void }
65 define void @test_fcmp_false_s64() { ret void }
67 define void @test_fcmp_oeq_s64() { ret void }
68 define void @test_fcmp_ogt_s64() { ret void }
69 define void @test_fcmp_oge_s64() { ret void }
70 define void @test_fcmp_olt_s64() { ret void }
71 define void @test_fcmp_ole_s64() { ret void }
72 define void @test_fcmp_ord_s64() { ret void }
73 define void @test_fcmp_ugt_s64() { ret void }
74 define void @test_fcmp_uge_s64() { ret void }
75 define void @test_fcmp_ult_s64() { ret void }
76 define void @test_fcmp_ule_s64() { ret void }
77 define void @test_fcmp_une_s64() { ret void }
78 define void @test_fcmp_uno_s64() { ret void }
80 define void @test_fcmp_one_s64() { ret void }
81 define void @test_fcmp_ueq_s64() { ret void }
85 # CHECK-LABEL: name: test_frem_float
87 # CHECK: legalized: true
88 regBankSelected: false
90 tracksRegLiveness: true
99 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
100 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
104 ; CHECK: ADJCALLSTACKDOWN
105 ; SOFT-DAG: $r0 = COPY [[X]]
106 ; SOFT-DAG: $r1 = COPY [[Y]]
107 ; HARD-DAG: $s0 = COPY [[X]]
108 ; HARD-DAG: $s1 = COPY [[Y]]
109 ; SOFT: BL{{.*}} &fmodf, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
110 ; HARD: BL{{.*}} &fmodf, {{.*}}, implicit $s0, implicit $s1, implicit-def $s0
111 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
112 ; HARD: [[R:%[0-9]+]]:_(s32) = COPY $s0
113 ; CHECK: ADJCALLSTACKUP
115 %2(s32) = G_FREM %0, %1
116 ; CHECK: $r0 = COPY [[R]]
118 BX_RET 14, $noreg, implicit $r0
121 name: test_frem_double
122 # CHECK-LABEL: name: test_frem_double
124 # CHECK: legalized: true
125 regBankSelected: false
127 tracksRegLiveness: true
129 - { id: 0, class: _ }
130 - { id: 1, class: _ }
131 - { id: 2, class: _ }
132 - { id: 3, class: _ }
133 - { id: 4, class: _ }
134 - { id: 5, class: _ }
135 - { id: 6, class: _ }
136 - { id: 7, class: _ }
137 - { id: 8, class: _ }
140 liveins: $r0, $r1, $r2, $r3
142 ; The inputs may be in the wrong order (depending on the target's
143 ; endianness), but that's orthogonal to what we're trying to test here.
144 ; For soft float, we only need to check that the first value, received
145 ; through R0-R1, ends up in R0-R1 or R1-R0, and the second value, received
146 ; through R2-R3, ends up in R2-R3 or R3-R2, when passed to fmod.
147 ; For hard float, the values need to end up in D0 and D1.
148 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
149 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
150 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
151 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
156 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
157 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
158 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
159 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
161 ; CHECK: ADJCALLSTACKDOWN
162 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
163 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
164 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
165 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
166 ; HARD-DAG: $d0 = COPY [[X]]
167 ; HARD-DAG: $d1 = COPY [[Y]]
168 ; SOFT: BL{{.*}} &fmod, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
169 ; HARD: BL{{.*}} &fmod, {{.*}}, implicit $d0, implicit $d1, implicit-def $d0
170 ; CHECK: ADJCALLSTACKUP
172 %6(s64) = G_FREM %4, %5
173 %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64)
176 BX_RET 14, $noreg, implicit $r0, implicit $r1
179 name: test_fpow_float
180 # CHECK-LABEL: name: test_fpow_float
182 # CHECK: legalized: true
183 regBankSelected: false
185 tracksRegLiveness: true
187 - { id: 0, class: _ }
188 - { id: 1, class: _ }
189 - { id: 2, class: _ }
194 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
195 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
199 ; CHECK: ADJCALLSTACKDOWN
200 ; SOFT-DAG: $r0 = COPY [[X]]
201 ; SOFT-DAG: $r1 = COPY [[Y]]
202 ; HARD-DAG: $s0 = COPY [[X]]
203 ; HARD-DAG: $s1 = COPY [[Y]]
204 ; SOFT: BL{{.*}} &powf, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
205 ; HARD: BL{{.*}} &powf, {{.*}}, implicit $s0, implicit $s1, implicit-def $s0
206 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
207 ; HARD: [[R:%[0-9]+]]:_(s32) = COPY $s0
208 ; CHECK: ADJCALLSTACKUP
210 %2(s32) = G_FPOW %0, %1
211 ; CHECK: $r0 = COPY [[R]]
213 BX_RET 14, $noreg, implicit $r0
216 name: test_fpow_double
217 # CHECK-LABEL: name: test_fpow_double
219 # CHECK: legalized: true
220 regBankSelected: false
222 tracksRegLiveness: true
224 - { id: 0, class: _ }
225 - { id: 1, class: _ }
226 - { id: 2, class: _ }
227 - { id: 3, class: _ }
228 - { id: 4, class: _ }
229 - { id: 5, class: _ }
230 - { id: 6, class: _ }
231 - { id: 7, class: _ }
232 - { id: 8, class: _ }
235 liveins: $r0, $r1, $r2, $r3
237 ; The inputs may be in the wrong order (depending on the target's
238 ; endianness), but that's orthogonal to what we're trying to test here.
239 ; For soft float, we only need to check that the first value, received
240 ; through R0-R1, ends up in R0-R1 or R1-R0, and the second value, received
241 ; through R2-R3, ends up in R2-R3 or R3-R2, when passed to pow.
242 ; For hard float, the values need to end up in D0 and D1.
243 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
244 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
245 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
246 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
251 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
252 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
253 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
254 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
256 ; CHECK: ADJCALLSTACKDOWN
257 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
258 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
259 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
260 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
261 ; HARD-DAG: $d0 = COPY [[X]]
262 ; HARD-DAG: $d1 = COPY [[Y]]
263 ; SOFT: BL{{.*}} &pow, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
264 ; HARD: BL{{.*}} &pow, {{.*}}, implicit $d0, implicit $d1, implicit-def $d0
265 ; CHECK: ADJCALLSTACKUP
267 %6(s64) = G_FPOW %4, %5
268 %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64)
271 BX_RET 14, $noreg, implicit $r0, implicit $r1
274 name: test_fadd_float
275 # CHECK-LABEL: name: test_fadd_float
277 # CHECK: legalized: true
278 regBankSelected: false
280 tracksRegLiveness: true
282 - { id: 0, class: _ }
283 - { id: 1, class: _ }
284 - { id: 2, class: _ }
289 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
290 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
293 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FADD [[X]], [[Y]]
295 ; SOFT: ADJCALLSTACKDOWN
296 ; SOFT-DAG: $r0 = COPY [[X]]
297 ; SOFT-DAG: $r1 = COPY [[Y]]
298 ; SOFT-AEABI: BL{{.*}} &__aeabi_fadd, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
299 ; SOFT-DEFAULT: BL{{.*}} &__addsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
300 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
301 ; SOFT: ADJCALLSTACKUP
303 %2(s32) = G_FADD %0, %1
304 ; CHECK: $r0 = COPY [[R]]
306 BX_RET 14, $noreg, implicit $r0
309 name: test_fadd_double
310 # CHECK-LABEL: name: test_fadd_double
312 # CHECK: legalized: true
313 regBankSelected: false
315 tracksRegLiveness: true
317 - { id: 0, class: _ }
318 - { id: 1, class: _ }
319 - { id: 2, class: _ }
320 - { id: 3, class: _ }
321 - { id: 4, class: _ }
322 - { id: 5, class: _ }
323 - { id: 6, class: _ }
324 - { id: 7, class: _ }
325 - { id: 8, class: _ }
328 liveins: $r0, $r1, $r2, $r3
330 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
331 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
332 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
333 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
338 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
339 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
340 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
341 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
342 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FADD [[X]], [[Y]]
344 ; SOFT: ADJCALLSTACKDOWN
345 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
346 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
347 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
348 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
349 ; SOFT-AEABI: BL{{.*}} &__aeabi_dadd, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
350 ; SOFT-DEFAULT: BL{{.*}} &__adddf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
351 ; SOFT: ADJCALLSTACKUP
353 %6(s64) = G_FADD %4, %5
354 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
355 %7(s32),%8(s32) = G_UNMERGE_VALUES %6(s64)
358 BX_RET 14, $noreg, implicit $r0, implicit $r1
361 name: test_fsub_float
362 # CHECK-LABEL: name: test_fsub_float
364 # CHECK: legalized: true
365 regBankSelected: false
367 tracksRegLiveness: true
369 - { id: 0, class: _ }
370 - { id: 1, class: _ }
371 - { id: 2, class: _ }
376 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
377 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
380 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FSUB [[X]], [[Y]]
382 ; SOFT: ADJCALLSTACKDOWN
383 ; SOFT-DAG: $r0 = COPY [[X]]
384 ; SOFT-DAG: $r1 = COPY [[Y]]
385 ; SOFT-AEABI: BL{{.*}} &__aeabi_fsub, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
386 ; SOFT-DEFAULT: BL{{.*}} &__subsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
387 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
388 ; SOFT: ADJCALLSTACKUP
390 %2(s32) = G_FSUB %0, %1
391 ; CHECK: $r0 = COPY [[R]]
393 BX_RET 14, $noreg, implicit $r0
396 name: test_fsub_double
397 # CHECK-LABEL: name: test_fsub_double
399 # CHECK: legalized: true
400 regBankSelected: false
402 tracksRegLiveness: true
404 - { id: 0, class: _ }
405 - { id: 1, class: _ }
406 - { id: 2, class: _ }
407 - { id: 3, class: _ }
408 - { id: 4, class: _ }
409 - { id: 5, class: _ }
410 - { id: 6, class: _ }
411 - { id: 7, class: _ }
412 - { id: 8, class: _ }
415 liveins: $r0, $r1, $r2, $r3
417 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
418 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
419 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
420 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
425 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
426 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
427 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
428 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
429 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FSUB [[X]], [[Y]]
431 ; SOFT: ADJCALLSTACKDOWN
432 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
433 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
434 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
435 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
436 ; SOFT-AEABI: BL{{.*}} &__aeabi_dsub, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
437 ; SOFT-DEFAULT: BL{{.*}} &__subdf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
438 ; SOFT: ADJCALLSTACKUP
440 %6(s64) = G_FSUB %4, %5
441 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
442 %7(s32),%8(s32) = G_UNMERGE_VALUES %6(s64)
445 BX_RET 14, $noreg, implicit $r0, implicit $r1
448 name: test_fmul_float
449 # CHECK-LABEL: name: test_fmul_float
451 # CHECK: legalized: true
452 regBankSelected: false
454 tracksRegLiveness: true
456 - { id: 0, class: _ }
457 - { id: 1, class: _ }
458 - { id: 2, class: _ }
463 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
464 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
467 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FMUL [[X]], [[Y]]
469 ; SOFT: ADJCALLSTACKDOWN
470 ; SOFT-DAG: $r0 = COPY [[X]]
471 ; SOFT-DAG: $r1 = COPY [[Y]]
472 ; SOFT-AEABI: BL{{.*}} &__aeabi_fmul, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
473 ; SOFT-DEFAULT: BL{{.*}} &__mulsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
474 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
475 ; SOFT: ADJCALLSTACKUP
477 %2(s32) = G_FMUL %0, %1
478 ; CHECK: $r0 = COPY [[R]]
480 BX_RET 14, $noreg, implicit $r0
483 name: test_fmul_double
484 # CHECK-LABEL: name: test_fmul_double
486 # CHECK: legalized: true
487 regBankSelected: false
489 tracksRegLiveness: true
491 - { id: 0, class: _ }
492 - { id: 1, class: _ }
493 - { id: 2, class: _ }
494 - { id: 3, class: _ }
495 - { id: 4, class: _ }
496 - { id: 5, class: _ }
497 - { id: 6, class: _ }
498 - { id: 7, class: _ }
499 - { id: 8, class: _ }
502 liveins: $r0, $r1, $r2, $r3
504 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
505 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
506 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
507 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
512 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
513 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
514 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
515 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
516 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FMUL [[X]], [[Y]]
518 ; SOFT: ADJCALLSTACKDOWN
519 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
520 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
521 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
522 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
523 ; SOFT-AEABI: BL{{.*}} &__aeabi_dmul, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
524 ; SOFT-DEFAULT: BL{{.*}} &__muldf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
525 ; SOFT: ADJCALLSTACKUP
527 %6(s64) = G_FMUL %4, %5
528 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
529 %7(s32),%8(s32) = G_UNMERGE_VALUES %6(s64)
532 BX_RET 14, $noreg, implicit $r0, implicit $r1
535 name: test_fdiv_float
536 # CHECK-LABEL: name: test_fdiv_float
538 # CHECK: legalized: true
539 regBankSelected: false
541 tracksRegLiveness: true
543 - { id: 0, class: _ }
544 - { id: 1, class: _ }
545 - { id: 2, class: _ }
550 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
551 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
554 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FDIV [[X]], [[Y]]
556 ; SOFT: ADJCALLSTACKDOWN
557 ; SOFT-DAG: $r0 = COPY [[X]]
558 ; SOFT-DAG: $r1 = COPY [[Y]]
559 ; SOFT-AEABI: BL{{.*}} &__aeabi_fdiv, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
560 ; SOFT-DEFAULT: BL{{.*}} &__divsf3, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
561 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
562 ; SOFT: ADJCALLSTACKUP
564 %2(s32) = G_FDIV %0, %1
565 ; CHECK: $r0 = COPY [[R]]
567 BX_RET 14, $noreg, implicit $r0
570 name: test_fdiv_double
571 # CHECK-LABEL: name: test_fdiv_double
573 # CHECK: legalized: true
574 regBankSelected: false
576 tracksRegLiveness: true
578 - { id: 0, class: _ }
579 - { id: 1, class: _ }
580 - { id: 2, class: _ }
581 - { id: 3, class: _ }
582 - { id: 4, class: _ }
583 - { id: 5, class: _ }
584 - { id: 6, class: _ }
585 - { id: 7, class: _ }
586 - { id: 8, class: _ }
589 liveins: $r0, $r1, $r2, $r3
591 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
592 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
593 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
594 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
599 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
600 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]]
601 %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)
602 %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)
603 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FDIV [[X]], [[Y]]
605 ; SOFT: ADJCALLSTACKDOWN
606 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
607 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
608 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y0]]
609 ; SOFT-DAG: $r{{[2-3]}} = COPY [[Y1]]
610 ; SOFT-AEABI: BL{{.*}} &__aeabi_ddiv, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
611 ; SOFT-DEFAULT: BL{{.*}} &__divdf3, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0, implicit-def $r1
612 ; SOFT: ADJCALLSTACKUP
614 %6(s64) = G_FDIV %4, %5
615 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
616 %7(s32),%8(s32) = G_UNMERGE_VALUES %6(s64)
619 BX_RET 14, $noreg, implicit $r0, implicit $r1
622 name: test_fconstant_float
623 # CHECK-LABEL: name: test_fconstant_float
625 # CHECK: legalized: true
626 regBankSelected: false
628 tracksRegLiveness: true
630 - { id: 0, class: _ }
635 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FCONSTANT float -1.25
636 ; SOFT-NOT: G_FCONSTANT
637 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1080033280
638 ; SOFT-NOT: G_FCONSTANT
639 %0(s32) = G_FCONSTANT float -1.25
640 ; CHECK: $r0 = COPY [[R]]
642 BX_RET 14, $noreg, implicit $r0
645 name: test_fconstant_double
646 # CHECK-LABEL: name: test_fconstant_double
648 # CHECK: legalized: true
649 regBankSelected: false
651 tracksRegLiveness: true
653 - { id: 0, class: _ }
654 - { id: 1, class: _ }
655 - { id: 2, class: _ }
660 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FCONSTANT double -2.4
661 ; SOFT-NOT: G_FCONSTANT
662 ; SOFT-DAG: [[HI:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1073532109
663 ; SOFT-DAG: [[LO:%[0-9]+]]:_(s32) = G_CONSTANT i32 858993459
664 ; SOFT-NOT: G_FCONSTANT
665 %0(s64) = G_FCONSTANT double -2.4
666 ; HARD-DAG: G_UNMERGE_VALUES [[R]](s64)
667 ; SOFT-DAG: $r0 = COPY [[HI]]
668 ; SOFT-DAG: $r1 = COPY [[LO]]
669 %1(s32),%2(s32) = G_UNMERGE_VALUES %0(s64)
672 BX_RET 14, $noreg, implicit $r0, implicit $r1
675 name: test_fneg_float
676 # CHECK-LABEL: name: test_fneg_float
678 # CHECK: legalized: true
679 regBankSelected: false
681 tracksRegLiveness: true
683 - { id: 0, class: _ }
684 - { id: 1, class: _ }
689 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
691 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FNEG [[X]]
692 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
693 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_XOR [[X]], [[ZERO]]
695 ; CHECK: $r0 = COPY [[R]]
697 BX_RET 14, $noreg, implicit $r0
700 name: test_fneg_double
701 # CHECK-LABEL: name: test_fneg_double
703 # CHECK: legalized: true
704 regBankSelected: false
706 tracksRegLiveness: true
708 - { id: 0, class: _ }
709 - { id: 1, class: _ }
710 - { id: 2, class: _ }
711 - { id: 3, class: _ }
712 - { id: 4, class: _ }
713 - { id: 5, class: _ }
718 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
719 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
722 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
723 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
724 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FNEG [[X]]
725 ; HARD: G_UNMERGE_VALUES [[R]](s64)
726 ; SOFT: [[POSITIVE_ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
727 ; SOFT: [[NEGATIVE_ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
728 ; SOFT: [[LOWR:%[0-9]+]]:_(s32) = G_XOR [[X0]], [[POSITIVE_ZERO]]
729 ; SOFT: [[HIGHR:%[0-9]+]]:_(s32) = G_XOR [[X1]], [[NEGATIVE_ZERO]]
730 ; SOFT: $r0 = COPY [[LOWR]]
731 ; SOFT: $r1 = COPY [[HIGHR]]
733 %4(s32),%5(s32) = G_UNMERGE_VALUES %3(s64)
736 BX_RET 14, $noreg, implicit $r0, implicit $r1
739 name: test_fpext_float_to_double
740 # CHECK-LABEL: name: test_fpext_float_to_double
742 # CHECK: legalized: true
743 regBankSelected: false
745 tracksRegLiveness: true
747 - { id: 0, class: _ }
748 - { id: 1, class: _ }
749 - { id: 2, class: _ }
750 - { id: 3, class: _ }
755 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
757 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FPEXT [[X]]
759 ; SOFT: ADJCALLSTACKDOWN
760 ; SOFT-DAG: $r0 = COPY [[X]]
761 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
762 ; SOFT-DEFAULT: BL{{.*}} &__extendsfdf2, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
763 ; SOFT: [[R0:%[0-9]+]]:_(s32) = COPY $r0
764 ; SOFT: [[R1:%[0-9]+]]:_(s32) = COPY $r1
765 ; SOFT: ADJCALLSTACKUP
767 %1(s64) = G_FPEXT %0(s32)
768 ; HARD: G_UNMERGE_VALUES [[R]](s64)
769 ; SOFT-DAG: $r{{[0-1]}} = COPY [[R0]]
770 ; SOFT-DAG: $r{{[0-1]}} = COPY [[R1]]
771 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
774 BX_RET 14, $noreg, implicit $r0, implicit $r1
777 name: test_fptrunc_double_to_float
778 # CHECK-LABEL: name: test_fptrunc_double_to_float
780 # CHECK: legalized: true
781 regBankSelected: false
783 tracksRegLiveness: true
785 - { id: 0, class: _ }
786 - { id: 1, class: _ }
787 - { id: 2, class: _ }
788 - { id: 3, class: _ }
793 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
794 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
795 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
798 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
799 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTRUNC [[X]]
800 ; SOFT-NOT: G_FPTRUNC
801 ; SOFT: ADJCALLSTACKDOWN
802 ; SOFT-DAG: $r0 = COPY [[X0]]
803 ; SOFT-DAG: $r1 = COPY [[X1]]
804 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2f, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
805 ; SOFT-DEFAULT: BL{{.*}} &__truncdfsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
806 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
807 ; SOFT: ADJCALLSTACKUP
808 ; SOFT-NOT: G_FPTRUNC
809 %3(s32) = G_FPTRUNC %2(s64)
810 ; CHECK: $r0 = COPY [[R]]
812 BX_RET 14, $noreg, implicit $r0
815 name: test_fptosi_float
816 # CHECK-LABEL: name: test_fptosi_float
818 # CHECK: legalized: true
819 regBankSelected: false
821 tracksRegLiveness: true
823 - { id: 0, class: _ }
824 - { id: 1, class: _ }
829 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
831 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOSI [[X]]
833 ; SOFT: ADJCALLSTACKDOWN
834 ; SOFT-DAG: $r0 = COPY [[X]]
835 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2iz, {{.*}}, implicit $r0, implicit-def $r0
836 ; SOFT-DEFAULT: BL{{.*}} &__fixsfsi, {{.*}}, implicit $r0, implicit-def $r0
837 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
838 ; SOFT: ADJCALLSTACKUP
840 %1(s32) = G_FPTOSI %0(s32)
841 ; CHECK: $r0 = COPY [[R]]
843 BX_RET 14, $noreg, implicit $r0
846 name: test_fptosi_double
847 # CHECK-LABEL: name: test_fptosi_double
849 # CHECK: legalized: true
850 regBankSelected: false
852 tracksRegLiveness: true
854 - { id: 0, class: _ }
855 - { id: 1, class: _ }
856 - { id: 2, class: _ }
857 - { id: 3, class: _ }
862 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
863 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
866 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
867 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
868 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOSI [[X]]
870 ; SOFT: ADJCALLSTACKDOWN
871 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
872 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
873 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2iz, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
874 ; SOFT-DEFAULT: BL{{.*}} &__fixdfsi, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
875 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
876 ; SOFT: ADJCALLSTACKUP
878 %3(s32) = G_FPTOSI %2(s64)
879 ; CHECK: $r0 = COPY [[R]](s32)
881 BX_RET 14, $noreg, implicit $r0
884 name: test_fptoui_float
885 # CHECK-LABEL: name: test_fptoui_float
887 # CHECK: legalized: true
888 regBankSelected: false
890 tracksRegLiveness: true
892 - { id: 0, class: _ }
893 - { id: 1, class: _ }
898 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
900 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOUI [[X]]
902 ; SOFT: ADJCALLSTACKDOWN
903 ; SOFT-DAG: $r0 = COPY [[X]]
904 ; SOFT-AEABI: BL{{.*}} &__aeabi_f2uiz, {{.*}}, implicit $r0, implicit-def $r0
905 ; SOFT-DEFAULT: BL{{.*}} &__fixunssfsi, {{.*}}, implicit $r0, implicit-def $r0
906 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
907 ; SOFT: ADJCALLSTACKUP
909 %1(s32) = G_FPTOUI %0(s32)
910 ; CHECK: $r0 = COPY [[R]]
912 BX_RET 14, $noreg, implicit $r0
915 name: test_fptoui_double
916 # CHECK-LABEL: name: test_fptoui_double
918 # CHECK: legalized: true
919 regBankSelected: false
921 tracksRegLiveness: true
923 - { id: 0, class: _ }
924 - { id: 1, class: _ }
925 - { id: 2, class: _ }
926 - { id: 3, class: _ }
931 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
932 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
935 ; HARD: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]]
936 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
937 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOUI [[X]]
939 ; SOFT: ADJCALLSTACKDOWN
940 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X0]]
941 ; SOFT-DAG: $r{{[0-1]}} = COPY [[X1]]
942 ; SOFT-AEABI: BL{{.*}} &__aeabi_d2uiz, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
943 ; SOFT-DEFAULT: BL{{.*}} &__fixunsdfsi, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
944 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
945 ; SOFT: ADJCALLSTACKUP
947 %3(s32) = G_FPTOUI %2(s64)
948 ; CHECK: $r0 = COPY [[R]](s32)
950 BX_RET 14, $noreg, implicit $r0
953 name: test_sitofp_float
954 # CHECK-LABEL: name: test_sitofp_float
956 # CHECK: legalized: true
957 regBankSelected: false
959 tracksRegLiveness: true
961 - { id: 0, class: _ }
962 - { id: 1, class: _ }
967 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
969 ; HARD: [[R:%[0-9]+]]:_(s32) = G_SITOFP [[X]]
971 ; SOFT: ADJCALLSTACKDOWN
972 ; SOFT-DAG: $r0 = COPY [[X]]
973 ; SOFT-AEABI: BL{{.*}} &__aeabi_i2f, {{.*}}, implicit $r0, implicit-def $r0
974 ; SOFT-DEFAULT: BL{{.*}} &__floatsisf, {{.*}}, implicit $r0, implicit-def $r0
975 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
976 ; SOFT: ADJCALLSTACKUP
978 %1(s32) = G_SITOFP %0(s32)
979 ; CHECK: $r0 = COPY [[R]]
981 BX_RET 14, $noreg, implicit $r0
984 name: test_sitofp_double
985 # CHECK-LABEL: name: test_sitofp_double
987 # CHECK: legalized: true
988 regBankSelected: false
990 tracksRegLiveness: true
992 - { id: 0, class: _ }
993 - { id: 1, class: _ }
994 - { id: 2, class: _ }
995 - { id: 3, class: _ }
1000 ; CHECK: [[X:%[0-9]+]]:_(s32) = COPY $r0
1002 ; HARD: [[R:%[0-9]+]]:_(s64) = G_SITOFP [[X]]
1003 ; SOFT-NOT: G_SITOFP
1004 ; SOFT: ADJCALLSTACKDOWN
1005 ; SOFT: $r0 = COPY [[X]]
1006 ; SOFT-AEABI: BL{{.*}} &__aeabi_i2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1007 ; SOFT-DEFAULT: BL{{.*}} &__floatsidf, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1008 ; SOFT-DAG: [[R0:%[0-9]+]]:_(s32) = COPY $r0
1009 ; SOFT-DAG: [[R1:%[0-9]+]]:_(s32) = COPY $r1
1010 ; SOFT: ADJCALLSTACKUP
1011 ; SOFT-NOT: G_SITOFP
1012 %1(s64) = G_SITOFP %0(s32)
1013 ; HARD: [[R0:%[0-9]+]]:_(s32), [[R1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[R]]
1014 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
1015 ; CHECK-DAG: $r0 = COPY [[R0]](s32)
1016 ; CHECK-DAG: $r1 = COPY [[R1]](s32)
1019 BX_RET 14, $noreg, implicit $r0, implicit $r1
1022 name: test_uitofp_float
1023 # CHECK-LABEL: name: test_uitofp_float
1025 # CHECK: legalized: true
1026 regBankSelected: false
1028 tracksRegLiveness: true
1030 - { id: 0, class: _ }
1031 - { id: 1, class: _ }
1036 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1038 ; HARD: [[R:%[0-9]+]]:_(s32) = G_UITOFP [[X]]
1039 ; SOFT-NOT: G_UITOFP
1040 ; SOFT: ADJCALLSTACKDOWN
1041 ; SOFT-DAG: $r0 = COPY [[X]]
1042 ; SOFT-AEABI: BL{{.*}} &__aeabi_ui2f, {{.*}}, implicit $r0, implicit-def $r0
1043 ; SOFT-DEFAULT: BL{{.*}} &__floatunsisf, {{.*}}, implicit $r0, implicit-def $r0
1044 ; SOFT: [[R:%[0-9]+]]:_(s32) = COPY $r0
1045 ; SOFT: ADJCALLSTACKUP
1046 ; SOFT-NOT: G_UITOFP
1047 %1(s32) = G_UITOFP %0(s32)
1048 ; CHECK: $r0 = COPY [[R]]
1050 BX_RET 14, $noreg, implicit $r0
1053 name: test_uitofp_double
1054 # CHECK-LABEL: name: test_uitofp_double
1056 # CHECK: legalized: true
1057 regBankSelected: false
1059 tracksRegLiveness: true
1061 - { id: 0, class: _ }
1062 - { id: 1, class: _ }
1063 - { id: 2, class: _ }
1064 - { id: 3, class: _ }
1069 ; CHECK: [[X:%[0-9]+]]:_(s32) = COPY $r0
1071 ; HARD: [[R:%[0-9]+]]:_(s64) = G_UITOFP [[X]]
1072 ; SOFT-NOT: G_UITOFP
1073 ; SOFT: ADJCALLSTACKDOWN
1074 ; SOFT: $r0 = COPY [[X]]
1075 ; SOFT-AEABI: BL{{.*}} &__aeabi_ui2d, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1076 ; SOFT-DEFAULT: BL{{.*}} &__floatunsidf, {{.*}}, implicit $r0, implicit-def $r0, implicit-def $r1
1077 ; SOFT-DAG: [[R0:%[0-9]+]]:_(s32) = COPY $r0
1078 ; SOFT-DAG: [[R1:%[0-9]+]]:_(s32) = COPY $r1
1079 ; SOFT: ADJCALLSTACKUP
1080 ; SOFT-NOT: G_UITOFP
1081 %1(s64) = G_UITOFP %0(s32)
1082 ; HARD: [[R0:%[0-9]+]]:_(s32), [[R1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[R]]
1083 %2(s32), %3(s32) = G_UNMERGE_VALUES %1(s64)
1084 ; CHECK-DAG: $r0 = COPY [[R0]](s32)
1085 ; CHECK-DAG: $r1 = COPY [[R1]](s32)
1088 BX_RET 14, $noreg, implicit $r0, implicit $r1
1091 name: test_fcmp_true_s32
1092 # CHECK-LABEL: name: test_fcmp_true_s32
1094 # CHECK: legalized: true
1095 regBankSelected: false
1097 tracksRegLiveness: true
1099 - { id: 0, class: _ }
1100 - { id: 1, class: _ }
1101 - { id: 2, class: _ }
1102 - { id: 3, class: _ }
1109 %2(s1) = G_FCMP floatpred(true), %0(s32), %1
1110 %3(s32) = G_ZEXT %2(s1)
1112 BX_RET 14, $noreg, implicit $r0
1113 ; HARD-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1114 ; HARD-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1115 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(true), [[X]](s32), [[Y]]
1116 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1118 ; For soft float we just need to return a '-1' constant, but the truncation
1119 ; to 1 bit is converted by the combiner to the following masking sequence.
1120 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1121 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]](s32)
1122 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[R]]
1124 ; CHECK: $r0 = COPY [[REXT]]
1127 name: test_fcmp_false_s32
1128 # CHECK-LABEL: name: test_fcmp_false_s32
1130 # CHECK: legalized: true
1131 regBankSelected: false
1133 tracksRegLiveness: true
1135 - { id: 0, class: _ }
1136 - { id: 1, class: _ }
1137 - { id: 2, class: _ }
1138 - { id: 3, class: _ }
1145 %2(s1) = G_FCMP floatpred(false), %0(s32), %1
1146 %3(s32) = G_ZEXT %2(s1)
1148 BX_RET 14, $noreg, implicit $r0
1149 ; HARD-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1150 ; HARD-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1151 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(false), [[X]](s32), [[Y]]
1152 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1154 ; For soft float we just need to return a '0' constant, but the truncation
1155 ; to 1 bit is converted by the combiner to the following masking sequence.
1156 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1157 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1158 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]](s32)
1159 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1161 ; CHECK: $r0 = COPY [[REXT]]
1164 name: test_fcmp_oeq_s32
1165 # CHECK-LABEL: name: test_fcmp_oeq_s32
1167 # CHECK: legalized: true
1168 regBankSelected: false
1170 tracksRegLiveness: true
1172 - { id: 0, class: _ }
1173 - { id: 1, class: _ }
1174 - { id: 2, class: _ }
1175 - { id: 3, class: _ }
1182 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1183 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1184 %2(s1) = G_FCMP floatpred(oeq), %0(s32), %1
1185 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oeq), [[X]](s32), [[Y]]
1186 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1188 ; SOFT: ADJCALLSTACKDOWN
1189 ; SOFT-DAG: $r0 = COPY [[X]]
1190 ; SOFT-DAG: $r1 = COPY [[Y]]
1191 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1192 ; SOFT-DEFAULT: BL{{.*}} &__eqsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1193 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1194 ; SOFT: ADJCALLSTACKUP
1195 ; For aeabi, we just need to truncate the result. The combiner changes the
1196 ; truncation into the following masking sequence.
1197 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1198 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1199 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1200 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1201 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1202 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1204 %3(s32) = G_ZEXT %2(s1)
1206 ; CHECK: $r0 = COPY [[REXT]]
1207 BX_RET 14, $noreg, implicit $r0
1210 name: test_fcmp_ogt_s32
1211 # CHECK-LABEL: name: test_fcmp_ogt_s32
1213 # CHECK: legalized: true
1214 regBankSelected: false
1216 tracksRegLiveness: true
1218 - { id: 0, class: _ }
1219 - { id: 1, class: _ }
1220 - { id: 2, class: _ }
1221 - { id: 3, class: _ }
1228 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1229 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1230 %2(s1) = G_FCMP floatpred(ogt), %0(s32), %1
1231 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ogt), [[X]](s32), [[Y]]
1232 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1234 ; SOFT: ADJCALLSTACKDOWN
1235 ; SOFT-DAG: $r0 = COPY [[X]]
1236 ; SOFT-DAG: $r1 = COPY [[Y]]
1237 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1238 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1239 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1240 ; SOFT: ADJCALLSTACKUP
1241 ; For aeabi, we just need to truncate the result. The combiner changes the
1242 ; truncation into the following masking sequence.
1243 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1244 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1245 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1246 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1247 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1248 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1250 %3(s32) = G_ZEXT %2(s1)
1252 ; CHECK: $r0 = COPY [[REXT]]
1253 BX_RET 14, $noreg, implicit $r0
1256 name: test_fcmp_oge_s32
1257 # CHECK-LABEL: name: test_fcmp_oge_s32
1259 # CHECK: legalized: true
1260 regBankSelected: false
1262 tracksRegLiveness: true
1264 - { id: 0, class: _ }
1265 - { id: 1, class: _ }
1266 - { id: 2, class: _ }
1267 - { id: 3, class: _ }
1274 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1275 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1276 %2(s1) = G_FCMP floatpred(oge), %0(s32), %1
1277 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oge), [[X]](s32), [[Y]]
1278 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1280 ; SOFT: ADJCALLSTACKDOWN
1281 ; SOFT-DAG: $r0 = COPY [[X]]
1282 ; SOFT-DAG: $r1 = COPY [[Y]]
1283 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpge, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1284 ; SOFT-DEFAULT: BL{{.*}} &__gesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1285 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1286 ; SOFT: ADJCALLSTACKUP
1287 ; For aeabi, we just need to truncate the result. The combiner changes the
1288 ; truncation into the following masking sequence.
1289 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1290 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1291 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1292 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1293 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
1294 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1296 %3(s32) = G_ZEXT %2(s1)
1298 ; CHECK: $r0 = COPY [[REXT]]
1299 BX_RET 14, $noreg, implicit $r0
1302 name: test_fcmp_olt_s32
1303 # CHECK-LABEL: name: test_fcmp_olt_s32
1305 # CHECK: legalized: true
1306 regBankSelected: false
1308 tracksRegLiveness: true
1310 - { id: 0, class: _ }
1311 - { id: 1, class: _ }
1312 - { id: 2, class: _ }
1313 - { id: 3, class: _ }
1320 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1321 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1322 %2(s1) = G_FCMP floatpred(olt), %0(s32), %1
1323 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(olt), [[X]](s32), [[Y]]
1324 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1326 ; SOFT: ADJCALLSTACKDOWN
1327 ; SOFT-DAG: $r0 = COPY [[X]]
1328 ; SOFT-DAG: $r1 = COPY [[Y]]
1329 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1330 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1331 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1332 ; SOFT: ADJCALLSTACKUP
1333 ; For aeabi, we just need to truncate the result. The combiner changes the
1334 ; truncation into the following masking sequence.
1335 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1336 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1337 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1338 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1339 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
1340 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1342 %3(s32) = G_ZEXT %2(s1)
1344 ; CHECK: $r0 = COPY [[REXT]]
1345 BX_RET 14, $noreg, implicit $r0
1348 name: test_fcmp_ole_s32
1349 # CHECK-LABEL: name: test_fcmp_ole_s32
1351 # CHECK: legalized: true
1352 regBankSelected: false
1354 tracksRegLiveness: true
1356 - { id: 0, class: _ }
1357 - { id: 1, class: _ }
1358 - { id: 2, class: _ }
1359 - { id: 3, class: _ }
1366 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1367 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1368 %2(s1) = G_FCMP floatpred(ole), %0(s32), %1
1369 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ole), [[X]](s32), [[Y]]
1370 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1372 ; SOFT: ADJCALLSTACKDOWN
1373 ; SOFT-DAG: $r0 = COPY [[X]]
1374 ; SOFT-DAG: $r1 = COPY [[Y]]
1375 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmple, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1376 ; SOFT-DEFAULT: BL{{.*}} &__lesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1377 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1378 ; SOFT: ADJCALLSTACKUP
1379 ; For aeabi, we just need to truncate the result. The combiner changes the
1380 ; truncation into the following masking sequence.
1381 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1382 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1383 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1384 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1385 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
1386 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1388 %3(s32) = G_ZEXT %2(s1)
1390 ; CHECK: $r0 = COPY [[REXT]]
1391 BX_RET 14, $noreg, implicit $r0
1394 name: test_fcmp_ord_s32
1395 # CHECK-LABEL: name: test_fcmp_ord_s32
1397 # CHECK: legalized: true
1398 regBankSelected: false
1400 tracksRegLiveness: true
1402 - { id: 0, class: _ }
1403 - { id: 1, class: _ }
1404 - { id: 2, class: _ }
1405 - { id: 3, class: _ }
1412 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1413 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1414 %2(s1) = G_FCMP floatpred(ord), %0(s32), %1
1415 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ord), [[X]](s32), [[Y]]
1417 ; SOFT: ADJCALLSTACKDOWN
1418 ; SOFT-DAG: $r0 = COPY [[X]]
1419 ; SOFT-DAG: $r1 = COPY [[Y]]
1420 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1421 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1422 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1423 ; SOFT: ADJCALLSTACKUP
1424 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1425 ; SOFT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1427 %3(s32) = G_ZEXT %2(s1)
1428 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1430 ; CHECK: $r0 = COPY [[REXT]]
1431 BX_RET 14, $noreg, implicit $r0
1434 name: test_fcmp_ugt_s32
1435 # CHECK-LABEL: name: test_fcmp_ugt_s32
1437 # CHECK: legalized: true
1438 regBankSelected: false
1440 tracksRegLiveness: true
1442 - { id: 0, class: _ }
1443 - { id: 1, class: _ }
1444 - { id: 2, class: _ }
1445 - { id: 3, class: _ }
1452 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1453 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1454 %2(s1) = G_FCMP floatpred(ugt), %0(s32), %1
1455 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ugt), [[X]](s32), [[Y]]
1457 ; SOFT: ADJCALLSTACKDOWN
1458 ; SOFT-DAG: $r0 = COPY [[X]]
1459 ; SOFT-DAG: $r1 = COPY [[Y]]
1460 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmple, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1461 ; SOFT-DEFAULT: BL{{.*}} &__lesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1462 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1463 ; SOFT: ADJCALLSTACKUP
1464 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1465 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1466 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
1468 %3(s32) = G_ZEXT %2(s1)
1469 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1471 ; CHECK: $r0 = COPY [[REXT]]
1472 BX_RET 14, $noreg, implicit $r0
1475 name: test_fcmp_uge_s32
1476 # CHECK-LABEL: name: test_fcmp_uge_s32
1478 # CHECK: legalized: true
1479 regBankSelected: false
1481 tracksRegLiveness: true
1483 - { id: 0, class: _ }
1484 - { id: 1, class: _ }
1485 - { id: 2, class: _ }
1486 - { id: 3, class: _ }
1493 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1494 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1495 %2(s1) = G_FCMP floatpred(uge), %0(s32), %1
1496 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uge), [[X]](s32), [[Y]]
1498 ; SOFT: ADJCALLSTACKDOWN
1499 ; SOFT-DAG: $r0 = COPY [[X]]
1500 ; SOFT-DAG: $r1 = COPY [[Y]]
1501 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1502 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1503 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1504 ; SOFT: ADJCALLSTACKUP
1505 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1506 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1507 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
1509 %3(s32) = G_ZEXT %2(s1)
1510 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1512 ; CHECK: $r0 = COPY [[REXT]]
1513 BX_RET 14, $noreg, implicit $r0
1516 name: test_fcmp_ult_s32
1517 # CHECK-LABEL: name: test_fcmp_ult_s32
1519 # CHECK: legalized: true
1520 regBankSelected: false
1522 tracksRegLiveness: true
1524 - { id: 0, class: _ }
1525 - { id: 1, class: _ }
1526 - { id: 2, class: _ }
1527 - { id: 3, class: _ }
1534 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1535 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1536 %2(s1) = G_FCMP floatpred(ult), %0(s32), %1
1537 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ult), [[X]](s32), [[Y]]
1539 ; SOFT: ADJCALLSTACKDOWN
1540 ; SOFT-DAG: $r0 = COPY [[X]]
1541 ; SOFT-DAG: $r1 = COPY [[Y]]
1542 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpge, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1543 ; SOFT-DEFAULT: BL{{.*}} &__gesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1544 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1545 ; SOFT: ADJCALLSTACKUP
1546 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1547 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1548 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
1550 %3(s32) = G_ZEXT %2(s1)
1551 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1553 ; CHECK: $r0 = COPY [[REXT]]
1554 BX_RET 14, $noreg, implicit $r0
1557 name: test_fcmp_ule_s32
1558 # CHECK-LABEL: name: test_fcmp_ule_s32
1560 # CHECK: legalized: true
1561 regBankSelected: false
1563 tracksRegLiveness: true
1565 - { id: 0, class: _ }
1566 - { id: 1, class: _ }
1567 - { id: 2, class: _ }
1568 - { id: 3, class: _ }
1575 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1576 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1577 %2(s1) = G_FCMP floatpred(ule), %0(s32), %1
1578 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ule), [[X]](s32), [[Y]]
1580 ; SOFT: ADJCALLSTACKDOWN
1581 ; SOFT-DAG: $r0 = COPY [[X]]
1582 ; SOFT-DAG: $r1 = COPY [[Y]]
1583 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1584 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1585 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1586 ; SOFT: ADJCALLSTACKUP
1587 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1588 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1589 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
1591 %3(s32) = G_ZEXT %2(s1)
1592 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1594 ; CHECK: $r0 = COPY [[REXT]]
1595 BX_RET 14, $noreg, implicit $r0
1598 name: test_fcmp_une_s32
1599 # CHECK-LABEL: name: test_fcmp_une_s32
1601 # CHECK: legalized: true
1602 regBankSelected: false
1604 tracksRegLiveness: true
1606 - { id: 0, class: _ }
1607 - { id: 1, class: _ }
1608 - { id: 2, class: _ }
1609 - { id: 3, class: _ }
1616 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1617 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1618 %2(s1) = G_FCMP floatpred(une), %0(s32), %1
1619 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(une), [[X]](s32), [[Y]]
1621 ; SOFT: ADJCALLSTACKDOWN
1622 ; SOFT-DAG: $r0 = COPY [[X]]
1623 ; SOFT-DAG: $r1 = COPY [[Y]]
1624 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1625 ; SOFT-DEFAULT: BL{{.*}} &__nesf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1626 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1627 ; SOFT: ADJCALLSTACKUP
1628 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1629 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1630 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
1632 %3(s32) = G_ZEXT %2(s1)
1633 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1635 ; CHECK: $r0 = COPY [[REXT]]
1636 BX_RET 14, $noreg, implicit $r0
1639 name: test_fcmp_uno_s32
1640 # CHECK-LABEL: name: test_fcmp_uno_s32
1642 # CHECK: legalized: true
1643 regBankSelected: false
1645 tracksRegLiveness: true
1647 - { id: 0, class: _ }
1648 - { id: 1, class: _ }
1649 - { id: 2, class: _ }
1650 - { id: 3, class: _ }
1657 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1658 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1659 %2(s1) = G_FCMP floatpred(uno), %0(s32), %1
1660 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uno), [[X]](s32), [[Y]]
1661 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1663 ; SOFT: ADJCALLSTACKDOWN
1664 ; SOFT-DAG: $r0 = COPY [[X]]
1665 ; SOFT-DAG: $r1 = COPY [[Y]]
1666 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1667 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1668 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1669 ; SOFT: ADJCALLSTACKUP
1670 ; For aeabi, we just need to truncate the result. The combiner changes the
1671 ; truncation into the following masking sequence.
1672 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1673 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1674 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1675 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1676 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
1677 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1679 %3(s32) = G_ZEXT %2(s1)
1681 ; CHECK: $r0 = COPY [[REXT]]
1682 BX_RET 14, $noreg, implicit $r0
1685 name: test_fcmp_one_s32
1686 # CHECK-LABEL: name: test_fcmp_one_s32
1688 # CHECK: legalized: true
1689 regBankSelected: false
1691 tracksRegLiveness: true
1693 - { id: 0, class: _ }
1694 - { id: 1, class: _ }
1695 - { id: 2, class: _ }
1696 - { id: 3, class: _ }
1703 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1704 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1705 %2(s1) = G_FCMP floatpred(one), %0(s32), %1
1706 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(one), [[X]](s32), [[Y]]
1707 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1709 ; SOFT: ADJCALLSTACKDOWN
1710 ; SOFT-DAG: $r0 = COPY [[X]]
1711 ; SOFT-DAG: $r1 = COPY [[Y]]
1712 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1713 ; SOFT-DEFAULT: BL{{.*}} &__gtsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1714 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
1715 ; SOFT: ADJCALLSTACKUP
1716 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1717 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET1]](s32), [[ZERO]]
1719 ; SOFT: ADJCALLSTACKDOWN
1720 ; SOFT-DAG: $r0 = COPY [[X]]
1721 ; SOFT-DAG: $r1 = COPY [[Y]]
1722 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmplt, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1723 ; SOFT-DEFAULT: BL{{.*}} &__ltsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1724 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
1725 ; SOFT: ADJCALLSTACKUP
1726 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET2]](s32), [[ZERO]]
1727 ; SOFT-AEABI: [[R1EXT:%[0-9]+]]:_(s32) = COPY [[RET1]]
1728 ; SOFT-AEABI: [[R2EXT:%[0-9]+]]:_(s32) = COPY [[RET2]]
1729 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
1730 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
1731 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
1732 ; The result of the G_OR needs to be truncated, and the combiner turns the
1733 ; truncation into the following masking sequence.
1734 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1735 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
1736 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1738 %3(s32) = G_ZEXT %2(s1)
1740 ; CHECK: $r0 = COPY [[REXT]]
1741 BX_RET 14, $noreg, implicit $r0
1744 name: test_fcmp_ueq_s32
1745 # CHECK-LABEL: name: test_fcmp_ueq_s32
1747 # CHECK: legalized: true
1748 regBankSelected: false
1750 tracksRegLiveness: true
1752 - { id: 0, class: _ }
1753 - { id: 1, class: _ }
1754 - { id: 2, class: _ }
1755 - { id: 3, class: _ }
1762 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0
1763 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1
1764 %2(s1) = G_FCMP floatpred(ueq), %0(s32), %1
1765 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ueq), [[X]](s32), [[Y]]
1766 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1768 ; SOFT: ADJCALLSTACKDOWN
1769 ; SOFT-DAG: $r0 = COPY [[X]]
1770 ; SOFT-DAG: $r1 = COPY [[Y]]
1771 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1772 ; SOFT-DEFAULT: BL{{.*}} &__eqsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1773 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
1774 ; SOFT: ADJCALLSTACKUP
1775 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1776 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET1]](s32), [[ZERO]]
1778 ; SOFT: ADJCALLSTACKDOWN
1779 ; SOFT-DAG: $r0 = COPY [[X]]
1780 ; SOFT-DAG: $r1 = COPY [[Y]]
1781 ; SOFT-AEABI: BL{{.*}} &__aeabi_fcmpun, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1782 ; SOFT-DEFAULT: BL{{.*}} &__unordsf2, {{.*}}, implicit $r0, implicit $r1, implicit-def $r0
1783 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
1784 ; SOFT: ADJCALLSTACKUP
1785 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET2]](s32), [[ZERO]]
1786 ; SOFT-AEABI: [[R1EXT:%[0-9]+]]:_(s32) = COPY [[RET1]]
1787 ; SOFT-AEABI: [[R2EXT:%[0-9]+]]:_(s32) = COPY [[RET2]]
1788 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
1789 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
1790 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
1791 ; The result of the G_OR needs to be truncated, and the combiner turns the
1792 ; truncation into the following masking sequence.
1793 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1794 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
1795 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1797 %3(s32) = G_ZEXT %2(s1)
1799 ; CHECK: $r0 = COPY [[REXT]]
1800 BX_RET 14, $noreg, implicit $r0
1803 name: test_fcmp_true_s64
1804 # CHECK-LABEL: name: test_fcmp_true_s64
1806 # CHECK: legalized: true
1807 regBankSelected: false
1809 tracksRegLiveness: true
1811 - { id: 0, class: _ }
1812 - { id: 1, class: _ }
1813 - { id: 2, class: _ }
1814 - { id: 3, class: _ }
1815 - { id: 4, class: _ }
1816 - { id: 5, class: _ }
1817 - { id: 6, class: _ }
1818 - { id: 7, class: _ }
1821 liveins: $r0, $r1, $r2, $r3
1827 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1828 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1829 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1830 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1831 %4(s64) = G_MERGE_VALUES %0(s32), %1
1832 %5(s64) = G_MERGE_VALUES %2(s32), %3
1833 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1834 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1835 %6(s1) = G_FCMP floatpred(true), %4(s64), %5
1836 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(true), [[X]](s64), [[Y]]
1837 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1839 ; The result needs to be truncated, and the combiner turns the truncation
1840 ; into the following masking sequence.
1841 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1842 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[MASK]]
1843 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1845 %7(s32) = G_ZEXT %6(s1)
1847 ; CHECK: $r0 = COPY [[REXT]]
1848 BX_RET 14, $noreg, implicit $r0
1851 name: test_fcmp_false_s64
1852 # CHECK-LABEL: name: test_fcmp_false_s64
1854 # CHECK: legalized: true
1855 regBankSelected: false
1857 tracksRegLiveness: true
1859 - { id: 0, class: _ }
1860 - { id: 1, class: _ }
1861 - { id: 2, class: _ }
1862 - { id: 3, class: _ }
1863 - { id: 4, class: _ }
1864 - { id: 5, class: _ }
1865 - { id: 6, class: _ }
1866 - { id: 7, class: _ }
1869 liveins: $r0, $r1, $r2, $r3
1875 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1876 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1877 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1878 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1879 %4(s64) = G_MERGE_VALUES %0(s32), %1
1880 %5(s64) = G_MERGE_VALUES %2(s32), %3
1881 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1882 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1883 %6(s1) = G_FCMP floatpred(false), %4(s64), %5
1884 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(false), [[X]](s64), [[Y]]
1885 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1887 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1888 ; The result needs to be truncated, and the combiner turns the truncation
1889 ; into the following masking sequence.
1890 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1891 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
1892 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1895 %7(s32) = G_ZEXT %6(s1)
1897 ; CHECK: $r0 = COPY [[REXT]]
1898 BX_RET 14, $noreg, implicit $r0
1901 name: test_fcmp_oeq_s64
1902 # CHECK-LABEL: name: test_fcmp_oeq_s64
1904 # CHECK: legalized: true
1905 regBankSelected: false
1907 tracksRegLiveness: true
1909 - { id: 0, class: _ }
1910 - { id: 1, class: _ }
1911 - { id: 2, class: _ }
1912 - { id: 3, class: _ }
1913 - { id: 4, class: _ }
1914 - { id: 5, class: _ }
1915 - { id: 6, class: _ }
1916 - { id: 7, class: _ }
1919 liveins: $r0, $r1, $r2, $r3
1925 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1926 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1927 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1928 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1929 %4(s64) = G_MERGE_VALUES %0(s32), %1
1930 %5(s64) = G_MERGE_VALUES %2(s32), %3
1931 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1932 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1933 %6(s1) = G_FCMP floatpred(oeq), %4(s64), %5
1934 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oeq), [[X]](s64), [[Y]]
1935 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1937 ; SOFT: ADJCALLSTACKDOWN
1938 ; SOFT-DAG: $r0 = COPY [[X0]]
1939 ; SOFT-DAG: $r1 = COPY [[X1]]
1940 ; SOFT-DAG: $r2 = COPY [[Y0]]
1941 ; SOFT-DAG: $r3 = COPY [[Y1]]
1942 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1943 ; SOFT-DEFAULT: BL{{.*}} &__eqdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
1944 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
1945 ; SOFT: ADJCALLSTACKUP
1946 ; For aeabi, we just need to truncate the result. The combiner changes the
1947 ; truncation into the following masking sequence.
1948 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1949 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
1950 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
1951 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1952 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
1953 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1955 %7(s32) = G_ZEXT %6(s1)
1957 ; CHECK: $r0 = COPY [[REXT]]
1958 BX_RET 14, $noreg, implicit $r0
1961 name: test_fcmp_ogt_s64
1962 # CHECK-LABEL: name: test_fcmp_ogt_s64
1964 # CHECK: legalized: true
1965 regBankSelected: false
1967 tracksRegLiveness: true
1969 - { id: 0, class: _ }
1970 - { id: 1, class: _ }
1971 - { id: 2, class: _ }
1972 - { id: 3, class: _ }
1973 - { id: 4, class: _ }
1974 - { id: 5, class: _ }
1975 - { id: 6, class: _ }
1976 - { id: 7, class: _ }
1979 liveins: $r0, $r1, $r2, $r3
1985 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
1986 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
1987 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
1988 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
1989 %4(s64) = G_MERGE_VALUES %0(s32), %1
1990 %5(s64) = G_MERGE_VALUES %2(s32), %3
1991 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
1992 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
1993 %6(s1) = G_FCMP floatpred(ogt), %4(s64), %5
1994 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ogt), [[X]](s64), [[Y]]
1995 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
1997 ; SOFT: ADJCALLSTACKDOWN
1998 ; SOFT-DAG: $r0 = COPY [[X0]]
1999 ; SOFT-DAG: $r1 = COPY [[X1]]
2000 ; SOFT-DAG: $r2 = COPY [[Y0]]
2001 ; SOFT-DAG: $r3 = COPY [[Y1]]
2002 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2003 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2004 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2005 ; SOFT: ADJCALLSTACKUP
2006 ; For aeabi, we just need to truncate the result. The combiner changes the
2007 ; truncation into the following masking sequence.
2008 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2009 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2010 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2011 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2012 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
2013 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2015 %7(s32) = G_ZEXT %6(s1)
2017 ; CHECK: $r0 = COPY [[REXT]]
2018 BX_RET 14, $noreg, implicit $r0
2021 name: test_fcmp_oge_s64
2022 # CHECK-LABEL: name: test_fcmp_oge_s64
2024 # CHECK: legalized: true
2025 regBankSelected: false
2027 tracksRegLiveness: true
2029 - { id: 0, class: _ }
2030 - { id: 1, class: _ }
2031 - { id: 2, class: _ }
2032 - { id: 3, class: _ }
2033 - { id: 4, class: _ }
2034 - { id: 5, class: _ }
2035 - { id: 6, class: _ }
2036 - { id: 7, class: _ }
2039 liveins: $r0, $r1, $r2, $r3
2045 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2046 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2047 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2048 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2049 %4(s64) = G_MERGE_VALUES %0(s32), %1
2050 %5(s64) = G_MERGE_VALUES %2(s32), %3
2051 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2052 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2053 %6(s1) = G_FCMP floatpred(oge), %4(s64), %5
2054 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(oge), [[X]](s64), [[Y]]
2055 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2057 ; SOFT: ADJCALLSTACKDOWN
2058 ; SOFT-DAG: $r0 = COPY [[X0]]
2059 ; SOFT-DAG: $r1 = COPY [[X1]]
2060 ; SOFT-DAG: $r2 = COPY [[Y0]]
2061 ; SOFT-DAG: $r3 = COPY [[Y1]]
2062 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpge, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2063 ; SOFT-DEFAULT: BL{{.*}} &__gedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2064 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2065 ; SOFT: ADJCALLSTACKUP
2066 ; For aeabi, we just need to truncate the result. The combiner changes the
2067 ; truncation into the following masking sequence.
2068 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2069 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2070 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2071 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2072 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
2073 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2075 %7(s32) = G_ZEXT %6(s1)
2077 ; CHECK: $r0 = COPY [[REXT]]
2078 BX_RET 14, $noreg, implicit $r0
2081 name: test_fcmp_olt_s64
2082 # CHECK-LABEL: name: test_fcmp_olt_s64
2084 # CHECK: legalized: true
2085 regBankSelected: false
2087 tracksRegLiveness: true
2089 - { id: 0, class: _ }
2090 - { id: 1, class: _ }
2091 - { id: 2, class: _ }
2092 - { id: 3, class: _ }
2093 - { id: 4, class: _ }
2094 - { id: 5, class: _ }
2095 - { id: 6, class: _ }
2096 - { id: 7, class: _ }
2099 liveins: $r0, $r1, $r2, $r3
2105 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2106 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2107 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2108 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2109 %4(s64) = G_MERGE_VALUES %0(s32), %1
2110 %5(s64) = G_MERGE_VALUES %2(s32), %3
2111 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2112 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2113 %6(s1) = G_FCMP floatpred(olt), %4(s64), %5
2114 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(olt), [[X]](s64), [[Y]]
2115 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2117 ; SOFT: ADJCALLSTACKDOWN
2118 ; SOFT-DAG: $r0 = COPY [[X0]]
2119 ; SOFT-DAG: $r1 = COPY [[X1]]
2120 ; SOFT-DAG: $r2 = COPY [[Y0]]
2121 ; SOFT-DAG: $r3 = COPY [[Y1]]
2122 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2123 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2124 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2125 ; SOFT: ADJCALLSTACKUP
2126 ; For aeabi, we just need to truncate the result. The combiner changes the
2127 ; truncation into the following masking sequence.
2128 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2129 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2130 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2131 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2132 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
2133 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2135 %7(s32) = G_ZEXT %6(s1)
2137 ; CHECK: $r0 = COPY [[REXT]]
2138 BX_RET 14, $noreg, implicit $r0
2141 name: test_fcmp_ole_s64
2142 # CHECK-LABEL: name: test_fcmp_ole_s64
2144 # CHECK: legalized: true
2145 regBankSelected: false
2147 tracksRegLiveness: true
2149 - { id: 0, class: _ }
2150 - { id: 1, class: _ }
2151 - { id: 2, class: _ }
2152 - { id: 3, class: _ }
2153 - { id: 4, class: _ }
2154 - { id: 5, class: _ }
2155 - { id: 6, class: _ }
2156 - { id: 7, class: _ }
2159 liveins: $r0, $r1, $r2, $r3
2165 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2166 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2167 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2168 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2169 %4(s64) = G_MERGE_VALUES %0(s32), %1
2170 %5(s64) = G_MERGE_VALUES %2(s32), %3
2171 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2172 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2173 %6(s1) = G_FCMP floatpred(ole), %4(s64), %5
2174 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ole), [[X]](s64), [[Y]]
2175 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2177 ; SOFT: ADJCALLSTACKDOWN
2178 ; SOFT-DAG: $r0 = COPY [[X0]]
2179 ; SOFT-DAG: $r1 = COPY [[X1]]
2180 ; SOFT-DAG: $r2 = COPY [[Y0]]
2181 ; SOFT-DAG: $r3 = COPY [[Y1]]
2182 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmple, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2183 ; SOFT-DEFAULT: BL{{.*}} &__ledf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2184 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2185 ; SOFT: ADJCALLSTACKUP
2186 ; For aeabi, we just need to truncate the result. The combiner changes the
2187 ; truncation into the following masking sequence.
2188 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2189 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2190 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2191 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2192 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
2193 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2195 %7(s32) = G_ZEXT %6(s1)
2197 ; CHECK: $r0 = COPY [[REXT]]
2198 BX_RET 14, $noreg, implicit $r0
2201 name: test_fcmp_ord_s64
2202 # CHECK-LABEL: name: test_fcmp_ord_s64
2204 # CHECK: legalized: true
2205 regBankSelected: false
2207 tracksRegLiveness: true
2209 - { id: 0, class: _ }
2210 - { id: 1, class: _ }
2211 - { id: 2, class: _ }
2212 - { id: 3, class: _ }
2213 - { id: 4, class: _ }
2214 - { id: 5, class: _ }
2215 - { id: 6, class: _ }
2216 - { id: 7, class: _ }
2219 liveins: $r0, $r1, $r2, $r3
2225 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2226 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2227 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2228 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2229 %4(s64) = G_MERGE_VALUES %0(s32), %1
2230 %5(s64) = G_MERGE_VALUES %2(s32), %3
2231 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2232 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2233 %6(s1) = G_FCMP floatpred(ord), %4(s64), %5
2234 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ord), [[X]](s64), [[Y]]
2236 ; SOFT: ADJCALLSTACKDOWN
2237 ; SOFT-DAG: $r0 = COPY [[X0]]
2238 ; SOFT-DAG: $r1 = COPY [[X1]]
2239 ; SOFT-DAG: $r2 = COPY [[Y0]]
2240 ; SOFT-DAG: $r3 = COPY [[Y1]]
2241 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2242 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2243 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2244 ; SOFT: ADJCALLSTACKUP
2245 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2246 ; SOFT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2248 %7(s32) = G_ZEXT %6(s1)
2249 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2251 ; CHECK: $r0 = COPY [[REXT]]
2252 BX_RET 14, $noreg, implicit $r0
2255 name: test_fcmp_ugt_s64
2256 # CHECK-LABEL: name: test_fcmp_ugt_s64
2258 # CHECK: legalized: true
2259 regBankSelected: false
2261 tracksRegLiveness: true
2263 - { id: 0, class: _ }
2264 - { id: 1, class: _ }
2265 - { id: 2, class: _ }
2266 - { id: 3, class: _ }
2267 - { id: 4, class: _ }
2268 - { id: 5, class: _ }
2269 - { id: 6, class: _ }
2270 - { id: 7, class: _ }
2273 liveins: $r0, $r1, $r2, $r3
2279 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2280 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2281 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2282 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2283 %4(s64) = G_MERGE_VALUES %0(s32), %1
2284 %5(s64) = G_MERGE_VALUES %2(s32), %3
2285 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2286 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2287 %6(s1) = G_FCMP floatpred(ugt), %4(s64), %5
2288 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ugt), [[X]](s64), [[Y]]
2290 ; SOFT: ADJCALLSTACKDOWN
2291 ; SOFT-DAG: $r0 = COPY [[X0]]
2292 ; SOFT-DAG: $r1 = COPY [[X1]]
2293 ; SOFT-DAG: $r2 = COPY [[Y0]]
2294 ; SOFT-DAG: $r3 = COPY [[Y1]]
2295 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmple, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2296 ; SOFT-DEFAULT: BL{{.*}} &__ledf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2297 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2298 ; SOFT: ADJCALLSTACKUP
2299 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2300 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2301 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET]](s32), [[ZERO]]
2303 %7(s32) = G_ZEXT %6(s1)
2304 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2306 ; CHECK: $r0 = COPY [[REXT]]
2307 BX_RET 14, $noreg, implicit $r0
2310 name: test_fcmp_uge_s64
2311 # CHECK-LABEL: name: test_fcmp_uge_s64
2313 # CHECK: legalized: true
2314 regBankSelected: false
2316 tracksRegLiveness: true
2318 - { id: 0, class: _ }
2319 - { id: 1, class: _ }
2320 - { id: 2, class: _ }
2321 - { id: 3, class: _ }
2322 - { id: 4, class: _ }
2323 - { id: 5, class: _ }
2324 - { id: 6, class: _ }
2325 - { id: 7, class: _ }
2328 liveins: $r0, $r1, $r2, $r3
2334 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2335 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2336 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2337 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2338 %4(s64) = G_MERGE_VALUES %0(s32), %1
2339 %5(s64) = G_MERGE_VALUES %2(s32), %3
2340 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2341 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2342 %6(s1) = G_FCMP floatpred(uge), %4(s64), %5
2343 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uge), [[X]](s64), [[Y]]
2345 ; SOFT: ADJCALLSTACKDOWN
2346 ; SOFT-DAG: $r0 = COPY [[X0]]
2347 ; SOFT-DAG: $r1 = COPY [[X1]]
2348 ; SOFT-DAG: $r2 = COPY [[Y0]]
2349 ; SOFT-DAG: $r3 = COPY [[Y1]]
2350 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2351 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2352 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2353 ; SOFT: ADJCALLSTACKUP
2354 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2355 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2356 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sge), [[RET]](s32), [[ZERO]]
2358 %7(s32) = G_ZEXT %6(s1)
2359 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2361 ; CHECK: $r0 = COPY [[REXT]]
2362 BX_RET 14, $noreg, implicit $r0
2365 name: test_fcmp_ult_s64
2366 # CHECK-LABEL: name: test_fcmp_ult_s64
2368 # CHECK: legalized: true
2369 regBankSelected: false
2371 tracksRegLiveness: true
2373 - { id: 0, class: _ }
2374 - { id: 1, class: _ }
2375 - { id: 2, class: _ }
2376 - { id: 3, class: _ }
2377 - { id: 4, class: _ }
2378 - { id: 5, class: _ }
2379 - { id: 6, class: _ }
2380 - { id: 7, class: _ }
2383 liveins: $r0, $r1, $r2, $r3
2389 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2390 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2391 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2392 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2393 %4(s64) = G_MERGE_VALUES %0(s32), %1
2394 %5(s64) = G_MERGE_VALUES %2(s32), %3
2395 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2396 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2397 %6(s1) = G_FCMP floatpred(ult), %4(s64), %5
2398 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ult), [[X]](s64), [[Y]]
2400 ; SOFT: ADJCALLSTACKDOWN
2401 ; SOFT-DAG: $r0 = COPY [[X0]]
2402 ; SOFT-DAG: $r1 = COPY [[X1]]
2403 ; SOFT-DAG: $r2 = COPY [[Y0]]
2404 ; SOFT-DAG: $r3 = COPY [[Y1]]
2405 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpge, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2406 ; SOFT-DEFAULT: BL{{.*}} &__gedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2407 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2408 ; SOFT: ADJCALLSTACKUP
2409 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2410 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2411 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET]](s32), [[ZERO]]
2413 %7(s32) = G_ZEXT %6(s1)
2414 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2416 ; CHECK: $r0 = COPY [[REXT]]
2417 BX_RET 14, $noreg, implicit $r0
2420 name: test_fcmp_ule_s64
2421 # CHECK-LABEL: name: test_fcmp_ule_s64
2423 # CHECK: legalized: true
2424 regBankSelected: false
2426 tracksRegLiveness: true
2428 - { id: 0, class: _ }
2429 - { id: 1, class: _ }
2430 - { id: 2, class: _ }
2431 - { id: 3, class: _ }
2432 - { id: 4, class: _ }
2433 - { id: 5, class: _ }
2434 - { id: 6, class: _ }
2435 - { id: 7, class: _ }
2438 liveins: $r0, $r1, $r2, $r3
2444 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2445 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2446 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2447 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2448 %4(s64) = G_MERGE_VALUES %0(s32), %1
2449 %5(s64) = G_MERGE_VALUES %2(s32), %3
2450 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2451 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2452 %6(s1) = G_FCMP floatpred(ule), %4(s64), %5
2453 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ule), [[X]](s64), [[Y]]
2455 ; SOFT: ADJCALLSTACKDOWN
2456 ; SOFT-DAG: $r0 = COPY [[X0]]
2457 ; SOFT-DAG: $r1 = COPY [[X1]]
2458 ; SOFT-DAG: $r2 = COPY [[Y0]]
2459 ; SOFT-DAG: $r3 = COPY [[Y1]]
2460 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2461 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2462 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2463 ; SOFT: ADJCALLSTACKUP
2464 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2465 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2466 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(sle), [[RET]](s32), [[ZERO]]
2468 %7(s32) = G_ZEXT %6(s1)
2469 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2471 ; CHECK: $r0 = COPY [[REXT]]
2472 BX_RET 14, $noreg, implicit $r0
2475 name: test_fcmp_une_s64
2476 # CHECK-LABEL: name: test_fcmp_une_s64
2478 # CHECK: legalized: true
2479 regBankSelected: false
2481 tracksRegLiveness: true
2483 - { id: 0, class: _ }
2484 - { id: 1, class: _ }
2485 - { id: 2, class: _ }
2486 - { id: 3, class: _ }
2487 - { id: 4, class: _ }
2488 - { id: 5, class: _ }
2489 - { id: 6, class: _ }
2490 - { id: 7, class: _ }
2493 liveins: $r0, $r1, $r2, $r3
2499 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2500 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2501 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2502 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2503 %4(s64) = G_MERGE_VALUES %0(s32), %1
2504 %5(s64) = G_MERGE_VALUES %2(s32), %3
2505 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2506 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2507 %6(s1) = G_FCMP floatpred(une), %4(s64), %5
2508 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(une), [[X]](s64), [[Y]]
2510 ; SOFT: ADJCALLSTACKDOWN
2511 ; SOFT-DAG: $r0 = COPY [[X0]]
2512 ; SOFT-DAG: $r1 = COPY [[X1]]
2513 ; SOFT-DAG: $r2 = COPY [[Y0]]
2514 ; SOFT-DAG: $r3 = COPY [[Y1]]
2515 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2516 ; SOFT-DEFAULT: BL{{.*}} &__nedf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2517 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2518 ; SOFT: ADJCALLSTACKUP
2519 ; SOFT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2520 ; SOFT-AEABI: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET]](s32), [[ZERO]]
2521 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
2523 %7(s32) = G_ZEXT %6(s1)
2524 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2526 ; CHECK: $r0 = COPY [[REXT]]
2527 BX_RET 14, $noreg, implicit $r0
2530 name: test_fcmp_uno_s64
2531 # CHECK-LABEL: name: test_fcmp_uno_s64
2533 # CHECK: legalized: true
2534 regBankSelected: false
2536 tracksRegLiveness: true
2538 - { id: 0, class: _ }
2539 - { id: 1, class: _ }
2540 - { id: 2, class: _ }
2541 - { id: 3, class: _ }
2542 - { id: 4, class: _ }
2543 - { id: 5, class: _ }
2544 - { id: 6, class: _ }
2545 - { id: 7, class: _ }
2548 liveins: $r0, $r1, $r2, $r3
2554 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2555 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2556 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2557 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2558 %4(s64) = G_MERGE_VALUES %0(s32), %1
2559 %5(s64) = G_MERGE_VALUES %2(s32), %3
2560 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2561 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2562 %6(s1) = G_FCMP floatpred(uno), %4(s64), %5
2563 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(uno), [[X]](s64), [[Y]]
2564 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2566 ; SOFT: ADJCALLSTACKDOWN
2567 ; SOFT-DAG: $r0 = COPY [[X0]]
2568 ; SOFT-DAG: $r1 = COPY [[X1]]
2569 ; SOFT-DAG: $r2 = COPY [[Y0]]
2570 ; SOFT-DAG: $r3 = COPY [[Y1]]
2571 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2572 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2573 ; SOFT: [[RET:%[0-9]+]]:_(s32) = COPY $r0
2574 ; SOFT: ADJCALLSTACKUP
2575 ; For aeabi, we just need to truncate the result. The combiner changes the
2576 ; truncation into the following masking sequence.
2577 ; SOFT-AEABI: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2578 ; SOFT-AEABI: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[RET]](s32)
2579 ; SOFT-AEABI: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2580 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2581 ; SOFT-DEFAULT: [[R:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET]](s32), [[ZERO]]
2582 ; SOFT-DEFAULT: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2584 %7(s32) = G_ZEXT %6(s1)
2586 ; CHECK: $r0 = COPY [[REXT]]
2587 BX_RET 14, $noreg, implicit $r0
2590 name: test_fcmp_one_s64
2591 # CHECK-LABEL: name: test_fcmp_one_s64
2593 # CHECK: legalized: true
2594 regBankSelected: false
2596 tracksRegLiveness: true
2598 - { id: 0, class: _ }
2599 - { id: 1, class: _ }
2600 - { id: 2, class: _ }
2601 - { id: 3, class: _ }
2602 - { id: 4, class: _ }
2603 - { id: 5, class: _ }
2604 - { id: 6, class: _ }
2605 - { id: 7, class: _ }
2608 liveins: $r0, $r1, $r2, $r3
2614 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2615 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2616 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2617 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2618 %4(s64) = G_MERGE_VALUES %0(s32), %1
2619 %5(s64) = G_MERGE_VALUES %2(s32), %3
2620 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2621 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2622 %6(s1) = G_FCMP floatpred(one), %4(s64), %5
2623 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(one), [[X]](s64), [[Y]]
2624 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2626 ; SOFT: ADJCALLSTACKDOWN
2627 ; SOFT-DAG: $r0 = COPY [[X0]]
2628 ; SOFT-DAG: $r1 = COPY [[X1]]
2629 ; SOFT-DAG: $r2 = COPY [[Y0]]
2630 ; SOFT-DAG: $r3 = COPY [[Y1]]
2631 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpgt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2632 ; SOFT-DEFAULT: BL{{.*}} &__gtdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2633 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
2634 ; SOFT: ADJCALLSTACKUP
2635 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2636 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(sgt), [[RET1]](s32), [[ZERO]]
2638 ; SOFT: ADJCALLSTACKDOWN
2639 ; SOFT-DAG: $r0 = COPY [[X0]]
2640 ; SOFT-DAG: $r1 = COPY [[X1]]
2641 ; SOFT-DAG: $r2 = COPY [[Y0]]
2642 ; SOFT-DAG: $r3 = COPY [[Y1]]
2643 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmplt, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2644 ; SOFT-DEFAULT: BL{{.*}} &__ltdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2645 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
2646 ; SOFT: ADJCALLSTACKUP
2647 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(slt), [[RET2]](s32), [[ZERO]]
2648 ; SOFT-AEABI: [[R1EXT:%[0-9]+]]:_(s32) = COPY [[RET1]]
2649 ; SOFT-AEABI: [[R2EXT:%[0-9]+]]:_(s32) = COPY [[RET2]]
2650 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
2651 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
2652 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
2653 ; The result of the G_OR needs to be truncated, and the combiner turns the
2654 ; truncation into the following masking sequence.
2655 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2656 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
2657 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2659 %7(s32) = G_ZEXT %6(s1)
2661 ; CHECK: $r0 = COPY [[REXT]]
2662 BX_RET 14, $noreg, implicit $r0
2665 name: test_fcmp_ueq_s64
2666 # CHECK-LABEL: name: test_fcmp_ueq_s64
2668 # CHECK: legalized: true
2669 regBankSelected: false
2671 tracksRegLiveness: true
2673 - { id: 0, class: _ }
2674 - { id: 1, class: _ }
2675 - { id: 2, class: _ }
2676 - { id: 3, class: _ }
2677 - { id: 4, class: _ }
2678 - { id: 5, class: _ }
2679 - { id: 6, class: _ }
2680 - { id: 7, class: _ }
2683 liveins: $r0, $r1, $r2, $r3
2689 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0
2690 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1
2691 ; CHECK-DAG: [[Y0:%[0-9]+]]:_(s32) = COPY $r2
2692 ; CHECK-DAG: [[Y1:%[0-9]+]]:_(s32) = COPY $r3
2693 %4(s64) = G_MERGE_VALUES %0(s32), %1
2694 %5(s64) = G_MERGE_VALUES %2(s32), %3
2695 ; HARD-DAG: [[X:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[X0]](s32), [[X1]](s32)
2696 ; HARD-DAG: [[Y:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[Y0]](s32), [[Y1]](s32)
2697 %6(s1) = G_FCMP floatpred(ueq), %4(s64), %5
2698 ; HARD: [[R:%[0-9]+]]:_(s1) = G_FCMP floatpred(ueq), [[X]](s64), [[Y]]
2699 ; HARD: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1)
2701 ; SOFT: ADJCALLSTACKDOWN
2702 ; SOFT-DAG: $r0 = COPY [[X0]]
2703 ; SOFT-DAG: $r1 = COPY [[X1]]
2704 ; SOFT-DAG: $r2 = COPY [[Y0]]
2705 ; SOFT-DAG: $r3 = COPY [[Y1]]
2706 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpeq, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2707 ; SOFT-DEFAULT: BL{{.*}} &__eqdf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2708 ; SOFT: [[RET1:%[0-9]+]]:_(s32) = COPY $r0
2709 ; SOFT: ADJCALLSTACKUP
2710 ; SOFT-DEFAULT: [[ZERO:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
2711 ; SOFT-DEFAULT: [[R1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[RET1]](s32), [[ZERO]]
2713 ; SOFT: ADJCALLSTACKDOWN
2714 ; SOFT-DAG: $r0 = COPY [[X0]]
2715 ; SOFT-DAG: $r1 = COPY [[X1]]
2716 ; SOFT-DAG: $r2 = COPY [[Y0]]
2717 ; SOFT-DAG: $r3 = COPY [[Y1]]
2718 ; SOFT-AEABI: BL{{.*}} &__aeabi_dcmpun, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2719 ; SOFT-DEFAULT: BL{{.*}} &__unorddf2, {{.*}}, implicit $r0, implicit $r1, implicit $r2, implicit $r3, implicit-def $r0
2720 ; SOFT: [[RET2:%[0-9]+]]:_(s32) = COPY $r0
2721 ; SOFT: ADJCALLSTACKUP
2722 ; SOFT-DEFAULT: [[R2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[RET2]](s32), [[ZERO]]
2723 ; SOFT-AEABI: [[R1EXT:%[0-9]+]]:_(s32) = COPY [[RET1]]
2724 ; SOFT-AEABI: [[R2EXT:%[0-9]+]]:_(s32) = COPY [[RET2]]
2725 ; SOFT-DEFAULT: [[R1EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R1]]
2726 ; SOFT-DEFAULT: [[R2EXT:%[0-9]+]]:_(s32) = G_ANYEXT [[R2]]
2727 ; SOFT: [[R:%[0-9]+]]:_(s32) = G_OR [[R1EXT]], [[R2EXT]]
2728 ; The result of the G_OR needs to be truncated, and the combiner turns the
2729 ; truncation into the following masking sequence.
2730 ; SOFT: [[MASK:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
2731 ; SOFT: [[RCOPY:%[0-9]+]]:_(s32) = COPY [[R]]
2732 ; SOFT: [[REXT:%[0-9]+]]:_(s32) = G_AND [[RCOPY]], [[MASK]]
2734 %7(s32) = G_ZEXT %6(s1)
2736 ; CHECK: $r0 = COPY [[REXT]]
2737 BX_RET 14, $noreg, implicit $r0