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 7--- | 8 define void @test_frem_float() { ret void } 9 define void @test_frem_double() { ret void } 10 11 define void @test_fpow_float() { ret void } 12 define void @test_fpow_double() { ret void } 13 14 define void @test_fadd_float() { ret void } 15 define void @test_fadd_double() { ret void } 16 17 define void @test_fsub_float() { ret void } 18 define void @test_fsub_double() { ret void } 19 20 define void @test_fmul_float() { ret void } 21 define void @test_fmul_double() { ret void } 22 23 define void @test_fdiv_float() { ret void } 24 define void @test_fdiv_double() { ret void } 25 26 define void @test_fconstant_float() { ret void } 27 define void @test_fconstant_double() { ret void } 28 29 define void @test_fneg_float() { ret void } 30 define void @test_fneg_double() { ret void } 31 32 define void @test_fpext_float_to_double() { ret void } 33 define void @test_fptrunc_double_to_float() { ret void } 34 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 } 39 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 } 44 45 define void @test_fcmp_true_s32() { ret void } 46 define void @test_fcmp_false_s32() { ret void } 47 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 } 60 61 define void @test_fcmp_one_s32() { ret void } 62 define void @test_fcmp_ueq_s32() { ret void } 63 64 define void @test_fcmp_true_s64() { ret void } 65 define void @test_fcmp_false_s64() { ret void } 66 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 } 79 80 define void @test_fcmp_one_s64() { ret void } 81 define void @test_fcmp_ueq_s64() { ret void } 82... 83--- 84name: test_frem_float 85# CHECK-LABEL: name: test_frem_float 86legalized: false 87# CHECK: legalized: true 88regBankSelected: false 89selected: false 90tracksRegLiveness: true 91registers: 92 - { id: 0, class: _ } 93 - { id: 1, class: _ } 94 - { id: 2, class: _ } 95body: | 96 bb.0: 97 liveins: $r0, $r1 98 99 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 100 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1 101 %0(s32) = COPY $r0 102 %1(s32) = COPY $r1 103 ; CHECK-NOT: G_FREM 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 114 ; CHECK-NOT: G_FREM 115 %2(s32) = G_FREM %0, %1 116 ; CHECK: $r0 = COPY [[R]] 117 $r0 = COPY %2(s32) 118 BX_RET 14, $noreg, implicit $r0 119... 120--- 121name: test_frem_double 122# CHECK-LABEL: name: test_frem_double 123legalized: false 124# CHECK: legalized: true 125regBankSelected: false 126selected: false 127tracksRegLiveness: true 128registers: 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: _ } 138body: | 139 bb.0: 140 liveins: $r0, $r1, $r2, $r3 141 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 152 %0(s32) = COPY $r0 153 %1(s32) = COPY $r1 154 %2(s32) = COPY $r2 155 %3(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) 160 ; CHECK-NOT: G_FREM 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 171 ; CHECK-NOT: G_FREM 172 %6(s64) = G_FREM %4, %5 173 %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64) 174 $r0 = COPY %7(s32) 175 $r1 = COPY %8(s32) 176 BX_RET 14, $noreg, implicit $r0, implicit $r1 177... 178--- 179name: test_fpow_float 180# CHECK-LABEL: name: test_fpow_float 181legalized: false 182# CHECK: legalized: true 183regBankSelected: false 184selected: false 185tracksRegLiveness: true 186registers: 187 - { id: 0, class: _ } 188 - { id: 1, class: _ } 189 - { id: 2, class: _ } 190body: | 191 bb.0: 192 liveins: $r0, $r1 193 194 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 195 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1 196 %0(s32) = COPY $r0 197 %1(s32) = COPY $r1 198 ; CHECK-NOT: G_FPOW 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 209 ; CHECK-NOT: G_FPOW 210 %2(s32) = G_FPOW %0, %1 211 ; CHECK: $r0 = COPY [[R]] 212 $r0 = COPY %2(s32) 213 BX_RET 14, $noreg, implicit $r0 214... 215--- 216name: test_fpow_double 217# CHECK-LABEL: name: test_fpow_double 218legalized: false 219# CHECK: legalized: true 220regBankSelected: false 221selected: false 222tracksRegLiveness: true 223registers: 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: _ } 233body: | 234 bb.0: 235 liveins: $r0, $r1, $r2, $r3 236 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 247 %0(s32) = COPY $r0 248 %1(s32) = COPY $r1 249 %2(s32) = COPY $r2 250 %3(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) 255 ; CHECK-NOT: G_FPOW 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 266 ; CHECK-NOT: G_FPOW 267 %6(s64) = G_FPOW %4, %5 268 %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64) 269 $r0 = COPY %7(s32) 270 $r1 = COPY %8(s32) 271 BX_RET 14, $noreg, implicit $r0, implicit $r1 272... 273--- 274name: test_fadd_float 275# CHECK-LABEL: name: test_fadd_float 276legalized: false 277# CHECK: legalized: true 278regBankSelected: false 279selected: false 280tracksRegLiveness: true 281registers: 282 - { id: 0, class: _ } 283 - { id: 1, class: _ } 284 - { id: 2, class: _ } 285body: | 286 bb.0: 287 liveins: $r0, $r1 288 289 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 290 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1 291 %0(s32) = COPY $r0 292 %1(s32) = COPY $r1 293 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FADD [[X]], [[Y]] 294 ; SOFT-NOT: G_FADD 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 302 ; SOFT-NOT: G_FADD 303 %2(s32) = G_FADD %0, %1 304 ; CHECK: $r0 = COPY [[R]] 305 $r0 = COPY %2(s32) 306 BX_RET 14, $noreg, implicit $r0 307... 308--- 309name: test_fadd_double 310# CHECK-LABEL: name: test_fadd_double 311legalized: false 312# CHECK: legalized: true 313regBankSelected: false 314selected: false 315tracksRegLiveness: true 316registers: 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: _ } 326body: | 327 bb.0: 328 liveins: $r0, $r1, $r2, $r3 329 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 334 %0(s32) = COPY $r0 335 %1(s32) = COPY $r1 336 %2(s32) = COPY $r2 337 %3(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]] 343 ; SOFT-NOT: G_FADD 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 352 ; SOFT-NOT: G_FADD 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) 356 $r0 = COPY %7(s32) 357 $r1 = COPY %8(s32) 358 BX_RET 14, $noreg, implicit $r0, implicit $r1 359... 360--- 361name: test_fsub_float 362# CHECK-LABEL: name: test_fsub_float 363legalized: false 364# CHECK: legalized: true 365regBankSelected: false 366selected: false 367tracksRegLiveness: true 368registers: 369 - { id: 0, class: _ } 370 - { id: 1, class: _ } 371 - { id: 2, class: _ } 372body: | 373 bb.0: 374 liveins: $r0, $r1 375 376 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 377 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1 378 %0(s32) = COPY $r0 379 %1(s32) = COPY $r1 380 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FSUB [[X]], [[Y]] 381 ; SOFT-NOT: G_FSUB 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 389 ; SOFT-NOT: G_FSUB 390 %2(s32) = G_FSUB %0, %1 391 ; CHECK: $r0 = COPY [[R]] 392 $r0 = COPY %2(s32) 393 BX_RET 14, $noreg, implicit $r0 394... 395--- 396name: test_fsub_double 397# CHECK-LABEL: name: test_fsub_double 398legalized: false 399# CHECK: legalized: true 400regBankSelected: false 401selected: false 402tracksRegLiveness: true 403registers: 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: _ } 413body: | 414 bb.0: 415 liveins: $r0, $r1, $r2, $r3 416 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 421 %0(s32) = COPY $r0 422 %1(s32) = COPY $r1 423 %2(s32) = COPY $r2 424 %3(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]] 430 ; SOFT-NOT: G_FSUB 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 439 ; SOFT-NOT: G_FSUB 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) 443 $r0 = COPY %7(s32) 444 $r1 = COPY %8(s32) 445 BX_RET 14, $noreg, implicit $r0, implicit $r1 446... 447--- 448name: test_fmul_float 449# CHECK-LABEL: name: test_fmul_float 450legalized: false 451# CHECK: legalized: true 452regBankSelected: false 453selected: false 454tracksRegLiveness: true 455registers: 456 - { id: 0, class: _ } 457 - { id: 1, class: _ } 458 - { id: 2, class: _ } 459body: | 460 bb.0: 461 liveins: $r0, $r1 462 463 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 464 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1 465 %0(s32) = COPY $r0 466 %1(s32) = COPY $r1 467 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FMUL [[X]], [[Y]] 468 ; SOFT-NOT: G_FMUL 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 476 ; SOFT-NOT: G_FMUL 477 %2(s32) = G_FMUL %0, %1 478 ; CHECK: $r0 = COPY [[R]] 479 $r0 = COPY %2(s32) 480 BX_RET 14, $noreg, implicit $r0 481... 482--- 483name: test_fmul_double 484# CHECK-LABEL: name: test_fmul_double 485legalized: false 486# CHECK: legalized: true 487regBankSelected: false 488selected: false 489tracksRegLiveness: true 490registers: 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: _ } 500body: | 501 bb.0: 502 liveins: $r0, $r1, $r2, $r3 503 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 508 %0(s32) = COPY $r0 509 %1(s32) = COPY $r1 510 %2(s32) = COPY $r2 511 %3(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]] 517 ; SOFT-NOT: G_FMUL 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 526 ; SOFT-NOT: G_FMUL 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) 530 $r0 = COPY %7(s32) 531 $r1 = COPY %8(s32) 532 BX_RET 14, $noreg, implicit $r0, implicit $r1 533... 534--- 535name: test_fdiv_float 536# CHECK-LABEL: name: test_fdiv_float 537legalized: false 538# CHECK: legalized: true 539regBankSelected: false 540selected: false 541tracksRegLiveness: true 542registers: 543 - { id: 0, class: _ } 544 - { id: 1, class: _ } 545 - { id: 2, class: _ } 546body: | 547 bb.0: 548 liveins: $r0, $r1 549 550 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 551 ; CHECK-DAG: [[Y:%[0-9]+]]:_(s32) = COPY $r1 552 %0(s32) = COPY $r0 553 %1(s32) = COPY $r1 554 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FDIV [[X]], [[Y]] 555 ; SOFT-NOT: G_FDIV 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 563 ; SOFT-NOT: G_FDIV 564 %2(s32) = G_FDIV %0, %1 565 ; CHECK: $r0 = COPY [[R]] 566 $r0 = COPY %2(s32) 567 BX_RET 14, $noreg, implicit $r0 568... 569--- 570name: test_fdiv_double 571# CHECK-LABEL: name: test_fdiv_double 572legalized: false 573# CHECK: legalized: true 574regBankSelected: false 575selected: false 576tracksRegLiveness: true 577registers: 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: _ } 587body: | 588 bb.0: 589 liveins: $r0, $r1, $r2, $r3 590 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 595 %0(s32) = COPY $r0 596 %1(s32) = COPY $r1 597 %2(s32) = COPY $r2 598 %3(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]] 604 ; SOFT-NOT: G_FDIV 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 613 ; SOFT-NOT: G_FDIV 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) 617 $r0 = COPY %7(s32) 618 $r1 = COPY %8(s32) 619 BX_RET 14, $noreg, implicit $r0, implicit $r1 620... 621--- 622name: test_fconstant_float 623# CHECK-LABEL: name: test_fconstant_float 624legalized: false 625# CHECK: legalized: true 626regBankSelected: false 627selected: false 628tracksRegLiveness: true 629registers: 630 - { id: 0, class: _ } 631body: | 632 bb.0: 633 liveins: 634 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]] 641 $r0 = COPY %0(s32) 642 BX_RET 14, $noreg, implicit $r0 643... 644--- 645name: test_fconstant_double 646# CHECK-LABEL: name: test_fconstant_double 647legalized: false 648# CHECK: legalized: true 649regBankSelected: false 650selected: false 651tracksRegLiveness: true 652registers: 653 - { id: 0, class: _ } 654 - { id: 1, class: _ } 655 - { id: 2, class: _ } 656body: | 657 bb.0: 658 liveins: 659 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) 670 $r0 = COPY %2(s32) 671 $r1 = COPY %1(s32) 672 BX_RET 14, $noreg, implicit $r0, implicit $r1 673... 674--- 675name: test_fneg_float 676# CHECK-LABEL: name: test_fneg_float 677legalized: false 678# CHECK: legalized: true 679regBankSelected: false 680selected: false 681tracksRegLiveness: true 682registers: 683 - { id: 0, class: _ } 684 - { id: 1, class: _ } 685body: | 686 bb.0: 687 liveins: $r0 688 689 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 690 %0(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]] 694 %1(s32) = G_FNEG %0 695 ; CHECK: $r0 = COPY [[R]] 696 $r0 = COPY %1(s32) 697 BX_RET 14, $noreg, implicit $r0 698... 699--- 700name: test_fneg_double 701# CHECK-LABEL: name: test_fneg_double 702legalized: false 703# CHECK: legalized: true 704regBankSelected: false 705selected: false 706tracksRegLiveness: true 707registers: 708 - { id: 0, class: _ } 709 - { id: 1, class: _ } 710 - { id: 2, class: _ } 711 - { id: 3, class: _ } 712 - { id: 4, class: _ } 713 - { id: 5, class: _ } 714body: | 715 bb.0: 716 liveins: $r0, $r1 717 718 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0 719 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1 720 %0(s32) = COPY $r0 721 %1(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]] 732 %3(s64) = G_FNEG %2 733 %4(s32),%5(s32) = G_UNMERGE_VALUES %3(s64) 734 $r0 = COPY %4(s32) 735 $r1 = COPY %5(s32) 736 BX_RET 14, $noreg, implicit $r0, implicit $r1 737... 738--- 739name: test_fpext_float_to_double 740# CHECK-LABEL: name: test_fpext_float_to_double 741legalized: false 742# CHECK: legalized: true 743regBankSelected: false 744selected: false 745tracksRegLiveness: true 746registers: 747 - { id: 0, class: _ } 748 - { id: 1, class: _ } 749 - { id: 2, class: _ } 750 - { id: 3, class: _ } 751body: | 752 bb.0: 753 liveins: $r0 754 755 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 756 %0(s32) = COPY $r0 757 ; HARD: [[R:%[0-9]+]]:_(s64) = G_FPEXT [[X]] 758 ; SOFT-NOT: G_FPEXT 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 766 ; SOFT-NOT: G_FPEXT 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) 772 $r0 = COPY %2(s32) 773 $r1 = COPY %3(s32) 774 BX_RET 14, $noreg, implicit $r0, implicit $r1 775... 776--- 777name: test_fptrunc_double_to_float 778# CHECK-LABEL: name: test_fptrunc_double_to_float 779legalized: false 780# CHECK: legalized: true 781regBankSelected: false 782selected: false 783tracksRegLiveness: true 784registers: 785 - { id: 0, class: _ } 786 - { id: 1, class: _ } 787 - { id: 2, class: _ } 788 - { id: 3, class: _ } 789body: | 790 bb.0: 791 liveins: $r0, $r1 792 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]] 796 %0(s32) = COPY $r0 797 %1(s32) = COPY $r1 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]] 811 $r0 = COPY %3(s32) 812 BX_RET 14, $noreg, implicit $r0 813--- 814--- 815name: test_fptosi_float 816# CHECK-LABEL: name: test_fptosi_float 817legalized: false 818# CHECK: legalized: true 819regBankSelected: false 820selected: false 821tracksRegLiveness: true 822registers: 823 - { id: 0, class: _ } 824 - { id: 1, class: _ } 825body: | 826 bb.0: 827 liveins: $r0 828 829 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 830 %0(s32) = COPY $r0 831 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOSI [[X]] 832 ; SOFT-NOT: G_FPTOSI 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 839 ; SOFT-NOT: G_FPTOSI 840 %1(s32) = G_FPTOSI %0(s32) 841 ; CHECK: $r0 = COPY [[R]] 842 $r0 = COPY %1(s32) 843 BX_RET 14, $noreg, implicit $r0 844... 845--- 846name: test_fptosi_double 847# CHECK-LABEL: name: test_fptosi_double 848legalized: false 849# CHECK: legalized: true 850regBankSelected: false 851selected: false 852tracksRegLiveness: true 853registers: 854 - { id: 0, class: _ } 855 - { id: 1, class: _ } 856 - { id: 2, class: _ } 857 - { id: 3, class: _ } 858body: | 859 bb.0: 860 liveins: $r0, $r1 861 862 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0 863 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1 864 %0(s32) = COPY $r0 865 %1(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]] 869 ; SOFT-NOT: G_FPTOSI 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 877 ; SOFT-NOT: G_FPTOSI 878 %3(s32) = G_FPTOSI %2(s64) 879 ; CHECK: $r0 = COPY [[R]](s32) 880 $r0 = COPY %3(s32) 881 BX_RET 14, $noreg, implicit $r0 882... 883--- 884name: test_fptoui_float 885# CHECK-LABEL: name: test_fptoui_float 886legalized: false 887# CHECK: legalized: true 888regBankSelected: false 889selected: false 890tracksRegLiveness: true 891registers: 892 - { id: 0, class: _ } 893 - { id: 1, class: _ } 894body: | 895 bb.0: 896 liveins: $r0 897 898 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 899 %0(s32) = COPY $r0 900 ; HARD: [[R:%[0-9]+]]:_(s32) = G_FPTOUI [[X]] 901 ; SOFT-NOT: G_FPTOUI 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 908 ; SOFT-NOT: G_FPTOUI 909 %1(s32) = G_FPTOUI %0(s32) 910 ; CHECK: $r0 = COPY [[R]] 911 $r0 = COPY %1(s32) 912 BX_RET 14, $noreg, implicit $r0 913... 914--- 915name: test_fptoui_double 916# CHECK-LABEL: name: test_fptoui_double 917legalized: false 918# CHECK: legalized: true 919regBankSelected: false 920selected: false 921tracksRegLiveness: true 922registers: 923 - { id: 0, class: _ } 924 - { id: 1, class: _ } 925 - { id: 2, class: _ } 926 - { id: 3, class: _ } 927body: | 928 bb.0: 929 liveins: $r0, $r1 930 931 ; CHECK-DAG: [[X0:%[0-9]+]]:_(s32) = COPY $r0 932 ; CHECK-DAG: [[X1:%[0-9]+]]:_(s32) = COPY $r1 933 %0(s32) = COPY $r0 934 %1(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]] 938 ; SOFT-NOT: G_FPTOUI 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 946 ; SOFT-NOT: G_FPTOUI 947 %3(s32) = G_FPTOUI %2(s64) 948 ; CHECK: $r0 = COPY [[R]](s32) 949 $r0 = COPY %3(s32) 950 BX_RET 14, $noreg, implicit $r0 951... 952--- 953name: test_sitofp_float 954# CHECK-LABEL: name: test_sitofp_float 955legalized: false 956# CHECK: legalized: true 957regBankSelected: false 958selected: false 959tracksRegLiveness: true 960registers: 961 - { id: 0, class: _ } 962 - { id: 1, class: _ } 963body: | 964 bb.0: 965 liveins: $r0 966 967 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 968 %0(s32) = COPY $r0 969 ; HARD: [[R:%[0-9]+]]:_(s32) = G_SITOFP [[X]] 970 ; SOFT-NOT: G_SITOFP 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 977 ; SOFT-NOT: G_SITOFP 978 %1(s32) = G_SITOFP %0(s32) 979 ; CHECK: $r0 = COPY [[R]] 980 $r0 = COPY %1(s32) 981 BX_RET 14, $noreg, implicit $r0 982... 983--- 984name: test_sitofp_double 985# CHECK-LABEL: name: test_sitofp_double 986legalized: false 987# CHECK: legalized: true 988regBankSelected: false 989selected: false 990tracksRegLiveness: true 991registers: 992 - { id: 0, class: _ } 993 - { id: 1, class: _ } 994 - { id: 2, class: _ } 995 - { id: 3, class: _ } 996body: | 997 bb.0: 998 liveins: $r0 999 1000 ; CHECK: [[X:%[0-9]+]]:_(s32) = COPY $r0 1001 %0(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) 1017 $r0 = COPY %2(s32) 1018 $r1 = COPY %3(s32) 1019 BX_RET 14, $noreg, implicit $r0, implicit $r1 1020... 1021--- 1022name: test_uitofp_float 1023# CHECK-LABEL: name: test_uitofp_float 1024legalized: false 1025# CHECK: legalized: true 1026regBankSelected: false 1027selected: false 1028tracksRegLiveness: true 1029registers: 1030 - { id: 0, class: _ } 1031 - { id: 1, class: _ } 1032body: | 1033 bb.0: 1034 liveins: $r0 1035 1036 ; CHECK-DAG: [[X:%[0-9]+]]:_(s32) = COPY $r0 1037 %0(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]] 1049 $r0 = COPY %1(s32) 1050 BX_RET 14, $noreg, implicit $r0 1051... 1052--- 1053name: test_uitofp_double 1054# CHECK-LABEL: name: test_uitofp_double 1055legalized: false 1056# CHECK: legalized: true 1057regBankSelected: false 1058selected: false 1059tracksRegLiveness: true 1060registers: 1061 - { id: 0, class: _ } 1062 - { id: 1, class: _ } 1063 - { id: 2, class: _ } 1064 - { id: 3, class: _ } 1065body: | 1066 bb.0: 1067 liveins: $r0 1068 1069 ; CHECK: [[X:%[0-9]+]]:_(s32) = COPY $r0 1070 %0(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) 1086 $r0 = COPY %2(s32) 1087 $r1 = COPY %3(s32) 1088 BX_RET 14, $noreg, implicit $r0, implicit $r1 1089... 1090... 1091name: test_fcmp_true_s32 1092# CHECK-LABEL: name: test_fcmp_true_s32 1093legalized: false 1094# CHECK: legalized: true 1095regBankSelected: false 1096selected: false 1097tracksRegLiveness: true 1098registers: 1099 - { id: 0, class: _ } 1100 - { id: 1, class: _ } 1101 - { id: 2, class: _ } 1102 - { id: 3, class: _ } 1103body: | 1104 bb.0: 1105 liveins: $r0, $r1 1106 1107 %0(s32) = COPY $r0 1108 %1(s32) = COPY $r1 1109 %2(s1) = G_FCMP floatpred(true), %0(s32), %1 1110 %3(s32) = G_ZEXT %2(s1) 1111 $r0 = COPY %3(s32) 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) 1117 ; SOFT-NOT: G_FCMP 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]] 1123 ; SOFT-NOT: G_FCMP 1124 ; CHECK: $r0 = COPY [[REXT]] 1125... 1126--- 1127name: test_fcmp_false_s32 1128# CHECK-LABEL: name: test_fcmp_false_s32 1129legalized: false 1130# CHECK: legalized: true 1131regBankSelected: false 1132selected: false 1133tracksRegLiveness: true 1134registers: 1135 - { id: 0, class: _ } 1136 - { id: 1, class: _ } 1137 - { id: 2, class: _ } 1138 - { id: 3, class: _ } 1139body: | 1140 bb.0: 1141 liveins: $r0, $r1 1142 1143 %0(s32) = COPY $r0 1144 %1(s32) = COPY $r1 1145 %2(s1) = G_FCMP floatpred(false), %0(s32), %1 1146 %3(s32) = G_ZEXT %2(s1) 1147 $r0 = COPY %3(s32) 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) 1153 ; SOFT-NOT: G_FCMP 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]] 1160 ; SOFT-NOT: G_FCMP 1161 ; CHECK: $r0 = COPY [[REXT]] 1162... 1163--- 1164name: test_fcmp_oeq_s32 1165# CHECK-LABEL: name: test_fcmp_oeq_s32 1166legalized: false 1167# CHECK: legalized: true 1168regBankSelected: false 1169selected: false 1170tracksRegLiveness: true 1171registers: 1172 - { id: 0, class: _ } 1173 - { id: 1, class: _ } 1174 - { id: 2, class: _ } 1175 - { id: 3, class: _ } 1176body: | 1177 bb.0: 1178 liveins: $r0, $r1 1179 1180 %0(s32) = COPY $r0 1181 %1(s32) = COPY $r1 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) 1187 ; SOFT-NOT: G_FCMP 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) 1203 ; SOFT-NOT: G_FCMP 1204 %3(s32) = G_ZEXT %2(s1) 1205 $r0 = COPY %3(s32) 1206 ; CHECK: $r0 = COPY [[REXT]] 1207 BX_RET 14, $noreg, implicit $r0 1208... 1209--- 1210name: test_fcmp_ogt_s32 1211# CHECK-LABEL: name: test_fcmp_ogt_s32 1212legalized: false 1213# CHECK: legalized: true 1214regBankSelected: false 1215selected: false 1216tracksRegLiveness: true 1217registers: 1218 - { id: 0, class: _ } 1219 - { id: 1, class: _ } 1220 - { id: 2, class: _ } 1221 - { id: 3, class: _ } 1222body: | 1223 bb.0: 1224 liveins: $r0, $r1 1225 1226 %0(s32) = COPY $r0 1227 %1(s32) = COPY $r1 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) 1233 ; SOFT-NOT: G_FCMP 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) 1249 ; SOFT-NOT: G_FCMP 1250 %3(s32) = G_ZEXT %2(s1) 1251 $r0 = COPY %3(s32) 1252 ; CHECK: $r0 = COPY [[REXT]] 1253 BX_RET 14, $noreg, implicit $r0 1254... 1255--- 1256name: test_fcmp_oge_s32 1257# CHECK-LABEL: name: test_fcmp_oge_s32 1258legalized: false 1259# CHECK: legalized: true 1260regBankSelected: false 1261selected: false 1262tracksRegLiveness: true 1263registers: 1264 - { id: 0, class: _ } 1265 - { id: 1, class: _ } 1266 - { id: 2, class: _ } 1267 - { id: 3, class: _ } 1268body: | 1269 bb.0: 1270 liveins: $r0, $r1 1271 1272 %0(s32) = COPY $r0 1273 %1(s32) = COPY $r1 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) 1279 ; SOFT-NOT: G_FCMP 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) 1295 ; SOFT-NOT: G_FCMP 1296 %3(s32) = G_ZEXT %2(s1) 1297 $r0 = COPY %3(s32) 1298 ; CHECK: $r0 = COPY [[REXT]] 1299 BX_RET 14, $noreg, implicit $r0 1300... 1301--- 1302name: test_fcmp_olt_s32 1303# CHECK-LABEL: name: test_fcmp_olt_s32 1304legalized: false 1305# CHECK: legalized: true 1306regBankSelected: false 1307selected: false 1308tracksRegLiveness: true 1309registers: 1310 - { id: 0, class: _ } 1311 - { id: 1, class: _ } 1312 - { id: 2, class: _ } 1313 - { id: 3, class: _ } 1314body: | 1315 bb.0: 1316 liveins: $r0, $r1 1317 1318 %0(s32) = COPY $r0 1319 %1(s32) = COPY $r1 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) 1325 ; SOFT-NOT: G_FCMP 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) 1341 ; SOFT-NOT: G_FCMP 1342 %3(s32) = G_ZEXT %2(s1) 1343 $r0 = COPY %3(s32) 1344 ; CHECK: $r0 = COPY [[REXT]] 1345 BX_RET 14, $noreg, implicit $r0 1346... 1347--- 1348name: test_fcmp_ole_s32 1349# CHECK-LABEL: name: test_fcmp_ole_s32 1350legalized: false 1351# CHECK: legalized: true 1352regBankSelected: false 1353selected: false 1354tracksRegLiveness: true 1355registers: 1356 - { id: 0, class: _ } 1357 - { id: 1, class: _ } 1358 - { id: 2, class: _ } 1359 - { id: 3, class: _ } 1360body: | 1361 bb.0: 1362 liveins: $r0, $r1 1363 1364 %0(s32) = COPY $r0 1365 %1(s32) = COPY $r1 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) 1371 ; SOFT-NOT: G_FCMP 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) 1387 ; SOFT-NOT: G_FCMP 1388 %3(s32) = G_ZEXT %2(s1) 1389 $r0 = COPY %3(s32) 1390 ; CHECK: $r0 = COPY [[REXT]] 1391 BX_RET 14, $noreg, implicit $r0 1392... 1393--- 1394name: test_fcmp_ord_s32 1395# CHECK-LABEL: name: test_fcmp_ord_s32 1396legalized: false 1397# CHECK: legalized: true 1398regBankSelected: false 1399selected: false 1400tracksRegLiveness: true 1401registers: 1402 - { id: 0, class: _ } 1403 - { id: 1, class: _ } 1404 - { id: 2, class: _ } 1405 - { id: 3, class: _ } 1406body: | 1407 bb.0: 1408 liveins: $r0, $r1 1409 1410 %0(s32) = COPY $r0 1411 %1(s32) = COPY $r1 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]] 1416 ; SOFT-NOT: G_FCMP 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]] 1426 ; SOFT-NOT: G_FCMP 1427 %3(s32) = G_ZEXT %2(s1) 1428 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 1429 $r0 = COPY %3(s32) 1430 ; CHECK: $r0 = COPY [[REXT]] 1431 BX_RET 14, $noreg, implicit $r0 1432... 1433--- 1434name: test_fcmp_ugt_s32 1435# CHECK-LABEL: name: test_fcmp_ugt_s32 1436legalized: false 1437# CHECK: legalized: true 1438regBankSelected: false 1439selected: false 1440tracksRegLiveness: true 1441registers: 1442 - { id: 0, class: _ } 1443 - { id: 1, class: _ } 1444 - { id: 2, class: _ } 1445 - { id: 3, class: _ } 1446body: | 1447 bb.0: 1448 liveins: $r0, $r1 1449 1450 %0(s32) = COPY $r0 1451 %1(s32) = COPY $r1 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]] 1456 ; SOFT-NOT: G_FCMP 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]] 1467 ; SOFT-NOT: G_FCMP 1468 %3(s32) = G_ZEXT %2(s1) 1469 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 1470 $r0 = COPY %3(s32) 1471 ; CHECK: $r0 = COPY [[REXT]] 1472 BX_RET 14, $noreg, implicit $r0 1473... 1474--- 1475name: test_fcmp_uge_s32 1476# CHECK-LABEL: name: test_fcmp_uge_s32 1477legalized: false 1478# CHECK: legalized: true 1479regBankSelected: false 1480selected: false 1481tracksRegLiveness: true 1482registers: 1483 - { id: 0, class: _ } 1484 - { id: 1, class: _ } 1485 - { id: 2, class: _ } 1486 - { id: 3, class: _ } 1487body: | 1488 bb.0: 1489 liveins: $r0, $r1 1490 1491 %0(s32) = COPY $r0 1492 %1(s32) = COPY $r1 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]] 1497 ; SOFT-NOT: G_FCMP 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]] 1508 ; SOFT-NOT: G_FCMP 1509 %3(s32) = G_ZEXT %2(s1) 1510 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 1511 $r0 = COPY %3(s32) 1512 ; CHECK: $r0 = COPY [[REXT]] 1513 BX_RET 14, $noreg, implicit $r0 1514... 1515--- 1516name: test_fcmp_ult_s32 1517# CHECK-LABEL: name: test_fcmp_ult_s32 1518legalized: false 1519# CHECK: legalized: true 1520regBankSelected: false 1521selected: false 1522tracksRegLiveness: true 1523registers: 1524 - { id: 0, class: _ } 1525 - { id: 1, class: _ } 1526 - { id: 2, class: _ } 1527 - { id: 3, class: _ } 1528body: | 1529 bb.0: 1530 liveins: $r0, $r1 1531 1532 %0(s32) = COPY $r0 1533 %1(s32) = COPY $r1 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]] 1538 ; SOFT-NOT: G_FCMP 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]] 1549 ; SOFT-NOT: G_FCMP 1550 %3(s32) = G_ZEXT %2(s1) 1551 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 1552 $r0 = COPY %3(s32) 1553 ; CHECK: $r0 = COPY [[REXT]] 1554 BX_RET 14, $noreg, implicit $r0 1555... 1556--- 1557name: test_fcmp_ule_s32 1558# CHECK-LABEL: name: test_fcmp_ule_s32 1559legalized: false 1560# CHECK: legalized: true 1561regBankSelected: false 1562selected: false 1563tracksRegLiveness: true 1564registers: 1565 - { id: 0, class: _ } 1566 - { id: 1, class: _ } 1567 - { id: 2, class: _ } 1568 - { id: 3, class: _ } 1569body: | 1570 bb.0: 1571 liveins: $r0, $r1 1572 1573 %0(s32) = COPY $r0 1574 %1(s32) = COPY $r1 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]] 1579 ; SOFT-NOT: G_FCMP 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]] 1590 ; SOFT-NOT: G_FCMP 1591 %3(s32) = G_ZEXT %2(s1) 1592 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 1593 $r0 = COPY %3(s32) 1594 ; CHECK: $r0 = COPY [[REXT]] 1595 BX_RET 14, $noreg, implicit $r0 1596... 1597--- 1598name: test_fcmp_une_s32 1599# CHECK-LABEL: name: test_fcmp_une_s32 1600legalized: false 1601# CHECK: legalized: true 1602regBankSelected: false 1603selected: false 1604tracksRegLiveness: true 1605registers: 1606 - { id: 0, class: _ } 1607 - { id: 1, class: _ } 1608 - { id: 2, class: _ } 1609 - { id: 3, class: _ } 1610body: | 1611 bb.0: 1612 liveins: $r0, $r1 1613 1614 %0(s32) = COPY $r0 1615 %1(s32) = COPY $r1 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]] 1620 ; SOFT-NOT: G_FCMP 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]] 1631 ; SOFT-NOT: G_FCMP 1632 %3(s32) = G_ZEXT %2(s1) 1633 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 1634 $r0 = COPY %3(s32) 1635 ; CHECK: $r0 = COPY [[REXT]] 1636 BX_RET 14, $noreg, implicit $r0 1637... 1638--- 1639name: test_fcmp_uno_s32 1640# CHECK-LABEL: name: test_fcmp_uno_s32 1641legalized: false 1642# CHECK: legalized: true 1643regBankSelected: false 1644selected: false 1645tracksRegLiveness: true 1646registers: 1647 - { id: 0, class: _ } 1648 - { id: 1, class: _ } 1649 - { id: 2, class: _ } 1650 - { id: 3, class: _ } 1651body: | 1652 bb.0: 1653 liveins: $r0, $r1 1654 1655 %0(s32) = COPY $r0 1656 %1(s32) = COPY $r1 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) 1662 ; SOFT-NOT: G_FCMP 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) 1678 ; SOFT-NOT: G_FCMP 1679 %3(s32) = G_ZEXT %2(s1) 1680 $r0 = COPY %3(s32) 1681 ; CHECK: $r0 = COPY [[REXT]] 1682 BX_RET 14, $noreg, implicit $r0 1683... 1684--- 1685name: test_fcmp_one_s32 1686# CHECK-LABEL: name: test_fcmp_one_s32 1687legalized: false 1688# CHECK: legalized: true 1689regBankSelected: false 1690selected: false 1691tracksRegLiveness: true 1692registers: 1693 - { id: 0, class: _ } 1694 - { id: 1, class: _ } 1695 - { id: 2, class: _ } 1696 - { id: 3, class: _ } 1697body: | 1698 bb.0: 1699 liveins: $r0, $r1 1700 1701 %0(s32) = COPY $r0 1702 %1(s32) = COPY $r1 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) 1708 ; SOFT-NOT: G_FCMP 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]] 1718 ; SOFT-NOT: G_FCMP 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]] 1737 ; SOFT-NOT: G_FCMP 1738 %3(s32) = G_ZEXT %2(s1) 1739 $r0 = COPY %3(s32) 1740 ; CHECK: $r0 = COPY [[REXT]] 1741 BX_RET 14, $noreg, implicit $r0 1742... 1743--- 1744name: test_fcmp_ueq_s32 1745# CHECK-LABEL: name: test_fcmp_ueq_s32 1746legalized: false 1747# CHECK: legalized: true 1748regBankSelected: false 1749selected: false 1750tracksRegLiveness: true 1751registers: 1752 - { id: 0, class: _ } 1753 - { id: 1, class: _ } 1754 - { id: 2, class: _ } 1755 - { id: 3, class: _ } 1756body: | 1757 bb.0: 1758 liveins: $r0, $r1 1759 1760 %0(s32) = COPY $r0 1761 %1(s32) = COPY $r1 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) 1767 ; SOFT-NOT: G_FCMP 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]] 1777 ; SOFT-NOT: G_FCMP 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]] 1796 ; SOFT-NOT: G_FCMP 1797 %3(s32) = G_ZEXT %2(s1) 1798 $r0 = COPY %3(s32) 1799 ; CHECK: $r0 = COPY [[REXT]] 1800 BX_RET 14, $noreg, implicit $r0 1801... 1802--- 1803name: test_fcmp_true_s64 1804# CHECK-LABEL: name: test_fcmp_true_s64 1805legalized: false 1806# CHECK: legalized: true 1807regBankSelected: false 1808selected: false 1809tracksRegLiveness: true 1810registers: 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: _ } 1819body: | 1820 bb.0: 1821 liveins: $r0, $r1, $r2, $r3 1822 1823 %0(s32) = COPY $r0 1824 %1(s32) = COPY $r1 1825 %2(s32) = COPY $r2 1826 %3(s32) = COPY $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) 1838 ; SOFT-NOT: G_FCMP 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]] 1844 ; SOFT-NOT: G_FCMP 1845 %7(s32) = G_ZEXT %6(s1) 1846 $r0 = COPY %7(s32) 1847 ; CHECK: $r0 = COPY [[REXT]] 1848 BX_RET 14, $noreg, implicit $r0 1849... 1850--- 1851name: test_fcmp_false_s64 1852# CHECK-LABEL: name: test_fcmp_false_s64 1853legalized: false 1854# CHECK: legalized: true 1855regBankSelected: false 1856selected: false 1857tracksRegLiveness: true 1858registers: 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: _ } 1867body: | 1868 bb.0: 1869 liveins: $r0, $r1, $r2, $r3 1870 1871 %0(s32) = COPY $r0 1872 %1(s32) = COPY $r1 1873 %2(s32) = COPY $r2 1874 %3(s32) = COPY $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) 1886 ; SOFT-NOT: G_FCMP 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]] 1893 ; SOFT-NOT: G_FCMP 1894 ; SOFT-NOT: G_FCMP 1895 %7(s32) = G_ZEXT %6(s1) 1896 $r0 = COPY %7(s32) 1897 ; CHECK: $r0 = COPY [[REXT]] 1898 BX_RET 14, $noreg, implicit $r0 1899... 1900--- 1901name: test_fcmp_oeq_s64 1902# CHECK-LABEL: name: test_fcmp_oeq_s64 1903legalized: false 1904# CHECK: legalized: true 1905regBankSelected: false 1906selected: false 1907tracksRegLiveness: true 1908registers: 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: _ } 1917body: | 1918 bb.0: 1919 liveins: $r0, $r1, $r2, $r3 1920 1921 %0(s32) = COPY $r0 1922 %1(s32) = COPY $r1 1923 %2(s32) = COPY $r2 1924 %3(s32) = COPY $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) 1936 ; SOFT-NOT: G_FCMP 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) 1954 ; SOFT-NOT: G_FCMP 1955 %7(s32) = G_ZEXT %6(s1) 1956 $r0 = COPY %7(s32) 1957 ; CHECK: $r0 = COPY [[REXT]] 1958 BX_RET 14, $noreg, implicit $r0 1959... 1960--- 1961name: test_fcmp_ogt_s64 1962# CHECK-LABEL: name: test_fcmp_ogt_s64 1963legalized: false 1964# CHECK: legalized: true 1965regBankSelected: false 1966selected: false 1967tracksRegLiveness: true 1968registers: 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: _ } 1977body: | 1978 bb.0: 1979 liveins: $r0, $r1, $r2, $r3 1980 1981 %0(s32) = COPY $r0 1982 %1(s32) = COPY $r1 1983 %2(s32) = COPY $r2 1984 %3(s32) = COPY $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) 1996 ; SOFT-NOT: G_FCMP 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) 2014 ; SOFT-NOT: G_FCMP 2015 %7(s32) = G_ZEXT %6(s1) 2016 $r0 = COPY %7(s32) 2017 ; CHECK: $r0 = COPY [[REXT]] 2018 BX_RET 14, $noreg, implicit $r0 2019... 2020--- 2021name: test_fcmp_oge_s64 2022# CHECK-LABEL: name: test_fcmp_oge_s64 2023legalized: false 2024# CHECK: legalized: true 2025regBankSelected: false 2026selected: false 2027tracksRegLiveness: true 2028registers: 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: _ } 2037body: | 2038 bb.0: 2039 liveins: $r0, $r1, $r2, $r3 2040 2041 %0(s32) = COPY $r0 2042 %1(s32) = COPY $r1 2043 %2(s32) = COPY $r2 2044 %3(s32) = COPY $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) 2056 ; SOFT-NOT: G_FCMP 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) 2074 ; SOFT-NOT: G_FCMP 2075 %7(s32) = G_ZEXT %6(s1) 2076 $r0 = COPY %7(s32) 2077 ; CHECK: $r0 = COPY [[REXT]] 2078 BX_RET 14, $noreg, implicit $r0 2079... 2080--- 2081name: test_fcmp_olt_s64 2082# CHECK-LABEL: name: test_fcmp_olt_s64 2083legalized: false 2084# CHECK: legalized: true 2085regBankSelected: false 2086selected: false 2087tracksRegLiveness: true 2088registers: 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: _ } 2097body: | 2098 bb.0: 2099 liveins: $r0, $r1, $r2, $r3 2100 2101 %0(s32) = COPY $r0 2102 %1(s32) = COPY $r1 2103 %2(s32) = COPY $r2 2104 %3(s32) = COPY $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) 2116 ; SOFT-NOT: G_FCMP 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) 2134 ; SOFT-NOT: G_FCMP 2135 %7(s32) = G_ZEXT %6(s1) 2136 $r0 = COPY %7(s32) 2137 ; CHECK: $r0 = COPY [[REXT]] 2138 BX_RET 14, $noreg, implicit $r0 2139... 2140--- 2141name: test_fcmp_ole_s64 2142# CHECK-LABEL: name: test_fcmp_ole_s64 2143legalized: false 2144# CHECK: legalized: true 2145regBankSelected: false 2146selected: false 2147tracksRegLiveness: true 2148registers: 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: _ } 2157body: | 2158 bb.0: 2159 liveins: $r0, $r1, $r2, $r3 2160 2161 %0(s32) = COPY $r0 2162 %1(s32) = COPY $r1 2163 %2(s32) = COPY $r2 2164 %3(s32) = COPY $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) 2176 ; SOFT-NOT: G_FCMP 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) 2194 ; SOFT-NOT: G_FCMP 2195 %7(s32) = G_ZEXT %6(s1) 2196 $r0 = COPY %7(s32) 2197 ; CHECK: $r0 = COPY [[REXT]] 2198 BX_RET 14, $noreg, implicit $r0 2199... 2200--- 2201name: test_fcmp_ord_s64 2202# CHECK-LABEL: name: test_fcmp_ord_s64 2203legalized: false 2204# CHECK: legalized: true 2205regBankSelected: false 2206selected: false 2207tracksRegLiveness: true 2208registers: 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: _ } 2217body: | 2218 bb.0: 2219 liveins: $r0, $r1, $r2, $r3 2220 2221 %0(s32) = COPY $r0 2222 %1(s32) = COPY $r1 2223 %2(s32) = COPY $r2 2224 %3(s32) = COPY $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]] 2235 ; SOFT-NOT: G_FCMP 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]] 2247 ; SOFT-NOT: G_FCMP 2248 %7(s32) = G_ZEXT %6(s1) 2249 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 2250 $r0 = COPY %7(s32) 2251 ; CHECK: $r0 = COPY [[REXT]] 2252 BX_RET 14, $noreg, implicit $r0 2253... 2254--- 2255name: test_fcmp_ugt_s64 2256# CHECK-LABEL: name: test_fcmp_ugt_s64 2257legalized: false 2258# CHECK: legalized: true 2259regBankSelected: false 2260selected: false 2261tracksRegLiveness: true 2262registers: 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: _ } 2271body: | 2272 bb.0: 2273 liveins: $r0, $r1, $r2, $r3 2274 2275 %0(s32) = COPY $r0 2276 %1(s32) = COPY $r1 2277 %2(s32) = COPY $r2 2278 %3(s32) = COPY $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]] 2289 ; SOFT-NOT: G_FCMP 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]] 2302 ; SOFT-NOT: G_FCMP 2303 %7(s32) = G_ZEXT %6(s1) 2304 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 2305 $r0 = COPY %7(s32) 2306 ; CHECK: $r0 = COPY [[REXT]] 2307 BX_RET 14, $noreg, implicit $r0 2308... 2309--- 2310name: test_fcmp_uge_s64 2311# CHECK-LABEL: name: test_fcmp_uge_s64 2312legalized: false 2313# CHECK: legalized: true 2314regBankSelected: false 2315selected: false 2316tracksRegLiveness: true 2317registers: 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: _ } 2326body: | 2327 bb.0: 2328 liveins: $r0, $r1, $r2, $r3 2329 2330 %0(s32) = COPY $r0 2331 %1(s32) = COPY $r1 2332 %2(s32) = COPY $r2 2333 %3(s32) = COPY $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]] 2344 ; SOFT-NOT: G_FCMP 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]] 2357 ; SOFT-NOT: G_FCMP 2358 %7(s32) = G_ZEXT %6(s1) 2359 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 2360 $r0 = COPY %7(s32) 2361 ; CHECK: $r0 = COPY [[REXT]] 2362 BX_RET 14, $noreg, implicit $r0 2363... 2364--- 2365name: test_fcmp_ult_s64 2366# CHECK-LABEL: name: test_fcmp_ult_s64 2367legalized: false 2368# CHECK: legalized: true 2369regBankSelected: false 2370selected: false 2371tracksRegLiveness: true 2372registers: 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: _ } 2381body: | 2382 bb.0: 2383 liveins: $r0, $r1, $r2, $r3 2384 2385 %0(s32) = COPY $r0 2386 %1(s32) = COPY $r1 2387 %2(s32) = COPY $r2 2388 %3(s32) = COPY $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]] 2399 ; SOFT-NOT: G_FCMP 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]] 2412 ; SOFT-NOT: G_FCMP 2413 %7(s32) = G_ZEXT %6(s1) 2414 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 2415 $r0 = COPY %7(s32) 2416 ; CHECK: $r0 = COPY [[REXT]] 2417 BX_RET 14, $noreg, implicit $r0 2418... 2419--- 2420name: test_fcmp_ule_s64 2421# CHECK-LABEL: name: test_fcmp_ule_s64 2422legalized: false 2423# CHECK: legalized: true 2424regBankSelected: false 2425selected: false 2426tracksRegLiveness: true 2427registers: 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: _ } 2436body: | 2437 bb.0: 2438 liveins: $r0, $r1, $r2, $r3 2439 2440 %0(s32) = COPY $r0 2441 %1(s32) = COPY $r1 2442 %2(s32) = COPY $r2 2443 %3(s32) = COPY $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]] 2454 ; SOFT-NOT: G_FCMP 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]] 2467 ; SOFT-NOT: G_FCMP 2468 %7(s32) = G_ZEXT %6(s1) 2469 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 2470 $r0 = COPY %7(s32) 2471 ; CHECK: $r0 = COPY [[REXT]] 2472 BX_RET 14, $noreg, implicit $r0 2473... 2474--- 2475name: test_fcmp_une_s64 2476# CHECK-LABEL: name: test_fcmp_une_s64 2477legalized: false 2478# CHECK: legalized: true 2479regBankSelected: false 2480selected: false 2481tracksRegLiveness: true 2482registers: 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: _ } 2491body: | 2492 bb.0: 2493 liveins: $r0, $r1, $r2, $r3 2494 2495 %0(s32) = COPY $r0 2496 %1(s32) = COPY $r1 2497 %2(s32) = COPY $r2 2498 %3(s32) = COPY $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]] 2509 ; SOFT-NOT: G_FCMP 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]] 2522 ; SOFT-NOT: G_FCMP 2523 %7(s32) = G_ZEXT %6(s1) 2524 ; CHECK: [[REXT:%[0-9]+]]:_(s32) = G_ZEXT [[R]](s1) 2525 $r0 = COPY %7(s32) 2526 ; CHECK: $r0 = COPY [[REXT]] 2527 BX_RET 14, $noreg, implicit $r0 2528... 2529--- 2530name: test_fcmp_uno_s64 2531# CHECK-LABEL: name: test_fcmp_uno_s64 2532legalized: false 2533# CHECK: legalized: true 2534regBankSelected: false 2535selected: false 2536tracksRegLiveness: true 2537registers: 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: _ } 2546body: | 2547 bb.0: 2548 liveins: $r0, $r1, $r2, $r3 2549 2550 %0(s32) = COPY $r0 2551 %1(s32) = COPY $r1 2552 %2(s32) = COPY $r2 2553 %3(s32) = COPY $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) 2565 ; SOFT-NOT: G_FCMP 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) 2583 ; SOFT-NOT: G_FCMP 2584 %7(s32) = G_ZEXT %6(s1) 2585 $r0 = COPY %7(s32) 2586 ; CHECK: $r0 = COPY [[REXT]] 2587 BX_RET 14, $noreg, implicit $r0 2588... 2589--- 2590name: test_fcmp_one_s64 2591# CHECK-LABEL: name: test_fcmp_one_s64 2592legalized: false 2593# CHECK: legalized: true 2594regBankSelected: false 2595selected: false 2596tracksRegLiveness: true 2597registers: 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: _ } 2606body: | 2607 bb.0: 2608 liveins: $r0, $r1, $r2, $r3 2609 2610 %0(s32) = COPY $r0 2611 %1(s32) = COPY $r1 2612 %2(s32) = COPY $r2 2613 %3(s32) = COPY $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) 2625 ; SOFT-NOT: G_FCMP 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]] 2637 ; SOFT-NOT: G_FCMP 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]] 2658 ; SOFT-NOT: G_FCMP 2659 %7(s32) = G_ZEXT %6(s1) 2660 $r0 = COPY %7(s32) 2661 ; CHECK: $r0 = COPY [[REXT]] 2662 BX_RET 14, $noreg, implicit $r0 2663... 2664--- 2665name: test_fcmp_ueq_s64 2666# CHECK-LABEL: name: test_fcmp_ueq_s64 2667legalized: false 2668# CHECK: legalized: true 2669regBankSelected: false 2670selected: false 2671tracksRegLiveness: true 2672registers: 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: _ } 2681body: | 2682 bb.0: 2683 liveins: $r0, $r1, $r2, $r3 2684 2685 %0(s32) = COPY $r0 2686 %1(s32) = COPY $r1 2687 %2(s32) = COPY $r2 2688 %3(s32) = COPY $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) 2700 ; SOFT-NOT: G_FCMP 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]] 2712 ; SOFT-NOT: G_FCMP 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]] 2733 ; SOFT-NOT: G_FCMP 2734 %7(s32) = G_ZEXT %6(s1) 2735 $r0 = COPY %7(s32) 2736 ; CHECK: $r0 = COPY [[REXT]] 2737 BX_RET 14, $noreg, implicit $r0 2738... 2739