1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -O0 -mtriple arm-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s 3--- | 4 define void @test_mla() #0 { ret void } 5 define void @test_mla_commutative() #0 { ret void } 6 define void @test_mla_v5() #1 { ret void } 7 8 define void @test_mls() #2 { ret void } 9 define void @test_no_mls() { ret void } 10 11 define void @test_bicrr() { ret void } 12 define void @test_bicrr_commutative() { ret void } 13 14 define void @test_bicri() { ret void } 15 define void @test_bicri_commutative_xor() { ret void } 16 define void @test_bicri_commutative_and() { ret void } 17 define void @test_bicri_commutative_both() { ret void } 18 19 define void @test_movti16_0xffff() #2 { ret void } 20 21 define void @test_vnmuls() #3 { ret void } 22 define void @test_vnmuls_reassociate() #3 { ret void } 23 define void @test_vnmuld() #3 { ret void } 24 25 define void @test_vfnmas() #4 { ret void } 26 define void @test_vfnmad() #4 { ret void } 27 28 define void @test_vfmss() #4 { ret void } 29 define void @test_vfmsd() #4 { ret void } 30 31 define void @test_vfnmss() #4 { ret void } 32 33 define void @test_bfc() #2 { ret void } 34 define void @test_no_bfc_bad_mask() #2 { ret void } 35 36 attributes #0 = { "target-features"="+v6" } 37 attributes #1 = { "target-features"="-v6" } 38 attributes #2 = { "target-features"="+v6t2" } 39 attributes #3 = { "target-features"="+vfp2" } 40 attributes #4 = { "target-features"="+vfp4" } 41... 42--- 43name: test_mla 44legalized: true 45regBankSelected: true 46selected: false 47registers: 48 - { id: 0, class: gprb } 49 - { id: 1, class: gprb } 50 - { id: 2, class: gprb } 51 - { id: 3, class: gprb } 52 - { id: 4, class: gprb } 53body: | 54 bb.0: 55 liveins: $r0, $r1, $r2 56 57 ; CHECK-LABEL: name: test_mla 58 ; CHECK: [[COPY:%[0-9]+]]:gprnopc = COPY $r0 59 ; CHECK: [[COPY1:%[0-9]+]]:gprnopc = COPY $r1 60 ; CHECK: [[COPY2:%[0-9]+]]:gprnopc = COPY $r2 61 ; CHECK: [[MLA:%[0-9]+]]:gprnopc = MLA [[COPY]], [[COPY1]], [[COPY2]], 14 /* CC::al */, $noreg, $noreg 62 ; CHECK: $r0 = COPY [[MLA]] 63 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 64 %0(s32) = COPY $r0 65 %1(s32) = COPY $r1 66 %2(s32) = COPY $r2 67 68 %3(s32) = G_MUL %0, %1 69 %4(s32) = G_ADD %3, %2 70 71 $r0 = COPY %4(s32) 72 73 BX_RET 14, $noreg, implicit $r0 74... 75--- 76name: test_mla_commutative 77legalized: true 78regBankSelected: true 79selected: false 80registers: 81 - { id: 0, class: gprb } 82 - { id: 1, class: gprb } 83 - { id: 2, class: gprb } 84 - { id: 3, class: gprb } 85 - { id: 4, class: gprb } 86body: | 87 bb.0: 88 liveins: $r0, $r1, $r2 89 90 ; CHECK-LABEL: name: test_mla_commutative 91 ; CHECK: [[COPY:%[0-9]+]]:gprnopc = COPY $r0 92 ; CHECK: [[COPY1:%[0-9]+]]:gprnopc = COPY $r1 93 ; CHECK: [[COPY2:%[0-9]+]]:gprnopc = COPY $r2 94 ; CHECK: [[MLA:%[0-9]+]]:gprnopc = MLA [[COPY]], [[COPY1]], [[COPY2]], 14 /* CC::al */, $noreg, $noreg 95 ; CHECK: $r0 = COPY [[MLA]] 96 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 97 %0(s32) = COPY $r0 98 %1(s32) = COPY $r1 99 %2(s32) = COPY $r2 100 101 %3(s32) = G_MUL %0, %1 102 %4(s32) = G_ADD %2, %3 103 104 $r0 = COPY %4(s32) 105 106 BX_RET 14, $noreg, implicit $r0 107... 108--- 109name: test_mla_v5 110legalized: true 111regBankSelected: true 112selected: false 113registers: 114 - { id: 0, class: gprb } 115 - { id: 1, class: gprb } 116 - { id: 2, class: gprb } 117 - { id: 3, class: gprb } 118 - { id: 4, class: gprb } 119body: | 120 bb.0: 121 liveins: $r0, $r1, $r2 122 123 ; CHECK-LABEL: name: test_mla_v5 124 ; CHECK: [[COPY:%[0-9]+]]:gprnopc = COPY $r0 125 ; CHECK: [[COPY1:%[0-9]+]]:gprnopc = COPY $r1 126 ; CHECK: [[COPY2:%[0-9]+]]:gprnopc = COPY $r2 127 ; CHECK: early-clobber %4:gprnopc = MLAv5 [[COPY]], [[COPY1]], [[COPY2]], 14 /* CC::al */, $noreg, $noreg 128 ; CHECK: $r0 = COPY %4 129 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 130 %0(s32) = COPY $r0 131 %1(s32) = COPY $r1 132 %2(s32) = COPY $r2 133 134 %3(s32) = G_MUL %0, %1 135 %4(s32) = G_ADD %3, %2 136 137 $r0 = COPY %4(s32) 138 139 BX_RET 14, $noreg, implicit $r0 140... 141--- 142name: test_mls 143legalized: true 144regBankSelected: true 145selected: false 146registers: 147 - { id: 0, class: gprb } 148 - { id: 1, class: gprb } 149 - { id: 2, class: gprb } 150 - { id: 3, class: gprb } 151 - { id: 4, class: gprb } 152body: | 153 bb.0: 154 liveins: $r0, $r1, $r2 155 156 ; CHECK-LABEL: name: test_mls 157 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 158 ; CHECK: [[COPY1:%[0-9]+]]:gpr = COPY $r1 159 ; CHECK: [[COPY2:%[0-9]+]]:gpr = COPY $r2 160 ; CHECK: [[MLS:%[0-9]+]]:gpr = MLS [[COPY]], [[COPY1]], [[COPY2]], 14 /* CC::al */, $noreg 161 ; CHECK: $r0 = COPY [[MLS]] 162 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 163 %0(s32) = COPY $r0 164 %1(s32) = COPY $r1 165 %2(s32) = COPY $r2 166 167 %3(s32) = G_MUL %0, %1 168 %4(s32) = G_SUB %2, %3 169 170 $r0 = COPY %4(s32) 171 172 BX_RET 14, $noreg, implicit $r0 173... 174--- 175name: test_no_mls 176legalized: true 177regBankSelected: true 178selected: false 179registers: 180 - { id: 0, class: gprb } 181 - { id: 1, class: gprb } 182 - { id: 2, class: gprb } 183 - { id: 3, class: gprb } 184 - { id: 4, class: gprb } 185body: | 186 bb.0: 187 liveins: $r0, $r1, $r2 188 189 ; CHECK-LABEL: name: test_no_mls 190 ; CHECK: [[COPY:%[0-9]+]]:gprnopc = COPY $r0 191 ; CHECK: [[COPY1:%[0-9]+]]:gprnopc = COPY $r1 192 ; CHECK: [[COPY2:%[0-9]+]]:gpr = COPY $r2 193 ; CHECK: early-clobber %3:gprnopc = MULv5 [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg, $noreg 194 ; CHECK: [[SUBrr:%[0-9]+]]:gpr = SUBrr [[COPY2]], %3, 14 /* CC::al */, $noreg, $noreg 195 ; CHECK: $r0 = COPY [[SUBrr]] 196 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 197 %0(s32) = COPY $r0 198 %1(s32) = COPY $r1 199 %2(s32) = COPY $r2 200 201 %3(s32) = G_MUL %0, %1 202 %4(s32) = G_SUB %2, %3 203 204 $r0 = COPY %4(s32) 205 206 BX_RET 14, $noreg, implicit $r0 207... 208--- 209name: test_bicrr 210legalized: true 211regBankSelected: true 212selected: false 213registers: 214 - { id: 0, class: gprb } 215 - { id: 1, class: gprb } 216 - { id: 2, class: gprb } 217 - { id: 3, class: gprb } 218 - { id: 4, class: gprb } 219body: | 220 bb.0: 221 liveins: $r0, $r1 222 223 ; CHECK-LABEL: name: test_bicrr 224 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 225 ; CHECK: [[COPY1:%[0-9]+]]:gpr = COPY $r1 226 ; CHECK: [[BICrr:%[0-9]+]]:gpr = BICrr [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg, $noreg 227 ; CHECK: $r0 = COPY [[BICrr]] 228 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 229 %0(s32) = COPY $r0 230 %1(s32) = COPY $r1 231 232 %2(s32) = G_CONSTANT i32 -1 233 %3(s32) = G_XOR %1, %2 234 %4(s32) = G_AND %0, %3 235 236 $r0 = COPY %4(s32) 237 238 BX_RET 14, $noreg, implicit $r0 239... 240--- 241name: test_bicrr_commutative 242legalized: true 243regBankSelected: true 244selected: false 245registers: 246 - { id: 0, class: gprb } 247 - { id: 1, class: gprb } 248 - { id: 2, class: gprb } 249 - { id: 3, class: gprb } 250 - { id: 4, class: gprb } 251body: | 252 bb.0: 253 liveins: $r0, $r1 254 255 ; CHECK-LABEL: name: test_bicrr_commutative 256 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 257 ; CHECK: [[COPY1:%[0-9]+]]:gpr = COPY $r1 258 ; CHECK: [[BICrr:%[0-9]+]]:gpr = BICrr [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg, $noreg 259 ; CHECK: $r0 = COPY [[BICrr]] 260 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 261 %0(s32) = COPY $r0 262 %1(s32) = COPY $r1 263 264 %2(s32) = G_CONSTANT i32 -1 265 %3(s32) = G_XOR %1, %2 266 %4(s32) = G_AND %3, %0 267 268 $r0 = COPY %4(s32) 269 270 BX_RET 14, $noreg, implicit $r0 271... 272--- 273name: test_bicri 274legalized: true 275regBankSelected: true 276selected: false 277registers: 278 - { id: 0, class: gprb } 279 - { id: 1, class: gprb } 280 - { id: 2, class: gprb } 281 - { id: 3, class: gprb } 282 - { id: 4, class: gprb } 283body: | 284 bb.0: 285 liveins: $r0 286 287 ; CHECK-LABEL: name: test_bicri 288 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 289 ; CHECK: [[BICri:%[0-9]+]]:gpr = BICri [[COPY]], 192, 14 /* CC::al */, $noreg, $noreg 290 ; CHECK: $r0 = COPY [[BICri]] 291 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 292 %0(s32) = COPY $r0 293 294 ; This test and the following ones are a bit contrived, since they use a 295 ; G_XOR that can be constant-folded. They exist mostly to validate the 296 ; TableGen pattern that defines BICri. We also have a pattern for matching a 297 ; G_AND with a G_CONSTANT operand directly, which is the more common case, 298 ; but that will be covered by different tests. 299 %1(s32) = G_CONSTANT i32 192 300 301 %2(s32) = G_CONSTANT i32 -1 302 %3(s32) = G_XOR %1, %2 303 %4(s32) = G_AND %0, %3 304 305 $r0 = COPY %4(s32) 306 307 BX_RET 14, $noreg, implicit $r0 308... 309--- 310name: test_bicri_commutative_xor 311legalized: true 312regBankSelected: true 313selected: false 314registers: 315 - { id: 0, class: gprb } 316 - { id: 1, class: gprb } 317 - { id: 2, class: gprb } 318 - { id: 3, class: gprb } 319 - { id: 4, class: gprb } 320body: | 321 bb.0: 322 liveins: $r0 323 324 ; CHECK-LABEL: name: test_bicri_commutative_xor 325 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 326 ; CHECK: [[BICri:%[0-9]+]]:gpr = BICri [[COPY]], 192, 14 /* CC::al */, $noreg, $noreg 327 ; CHECK: $r0 = COPY [[BICri]] 328 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 329 %0(s32) = COPY $r0 330 331 %1(s32) = G_CONSTANT i32 192 332 333 %2(s32) = G_CONSTANT i32 -1 334 %3(s32) = G_XOR %2, %1 335 %4(s32) = G_AND %0, %3 336 337 $r0 = COPY %4(s32) 338 339 BX_RET 14, $noreg, implicit $r0 340... 341--- 342name: test_bicri_commutative_and 343legalized: true 344regBankSelected: true 345selected: false 346registers: 347 - { id: 0, class: gprb } 348 - { id: 1, class: gprb } 349 - { id: 2, class: gprb } 350 - { id: 3, class: gprb } 351 - { id: 4, class: gprb } 352body: | 353 bb.0: 354 liveins: $r0 355 356 ; CHECK-LABEL: name: test_bicri_commutative_and 357 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 358 ; CHECK: [[BICri:%[0-9]+]]:gpr = BICri [[COPY]], 192, 14 /* CC::al */, $noreg, $noreg 359 ; CHECK: $r0 = COPY [[BICri]] 360 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 361 %0(s32) = COPY $r0 362 363 %1(s32) = G_CONSTANT i32 192 364 365 %2(s32) = G_CONSTANT i32 -1 366 %3(s32) = G_XOR %1, %2 367 %4(s32) = G_AND %3, %0 368 369 $r0 = COPY %4(s32) 370 371 BX_RET 14, $noreg, implicit $r0 372... 373--- 374name: test_bicri_commutative_both 375legalized: true 376regBankSelected: true 377selected: false 378registers: 379 - { id: 0, class: gprb } 380 - { id: 1, class: gprb } 381 - { id: 2, class: gprb } 382 - { id: 3, class: gprb } 383 - { id: 4, class: gprb } 384body: | 385 bb.0: 386 liveins: $r0 387 388 ; CHECK-LABEL: name: test_bicri_commutative_both 389 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 390 ; CHECK: [[BICri:%[0-9]+]]:gpr = BICri [[COPY]], 192, 14 /* CC::al */, $noreg, $noreg 391 ; CHECK: $r0 = COPY [[BICri]] 392 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 393 %0(s32) = COPY $r0 394 395 %1(s32) = G_CONSTANT i32 192 396 397 %2(s32) = G_CONSTANT i32 -1 398 %3(s32) = G_XOR %2, %1 399 %4(s32) = G_AND %3, %0 400 401 $r0 = COPY %4(s32) 402 403 BX_RET 14, $noreg, implicit $r0 404... 405--- 406name: test_movti16_0xffff 407legalized: true 408regBankSelected: true 409selected: false 410registers: 411 - { id: 0, class: gprb } 412 - { id: 1, class: gprb } 413 - { id: 2, class: gprb } 414body: | 415 bb.0: 416 liveins: $r0 417 418 ; CHECK-LABEL: name: test_movti16_0xffff 419 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 420 ; CHECK: [[MOVTi16_:%[0-9]+]]:gprnopc = MOVTi16 [[COPY]], 65535, 14 /* CC::al */, $noreg 421 ; CHECK: $r0 = COPY [[MOVTi16_]] 422 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 423 %0(s32) = COPY $r0 424 425 %1(s32) = G_CONSTANT i32 4294901760 ; 0xFFFF0000 426 427 %2(s32) = G_OR %0, %1 428 429 $r0 = COPY %2(s32) 430 431 BX_RET 14, $noreg, implicit $r0 432... 433--- 434name: test_vnmuls 435legalized: true 436regBankSelected: true 437selected: false 438registers: 439 - { id: 0, class: fprb } 440 - { id: 1, class: fprb } 441 - { id: 2, class: fprb } 442 - { id: 3, class: fprb } 443body: | 444 bb.0: 445 liveins: $s0, $s1 446 447 ; CHECK-LABEL: name: test_vnmuls 448 ; CHECK: [[COPY:%[0-9]+]]:spr = COPY $s0 449 ; CHECK: [[COPY1:%[0-9]+]]:spr = COPY $s1 450 ; CHECK: [[VNMULS:%[0-9]+]]:spr = VNMULS [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg 451 ; CHECK: $s0 = COPY [[VNMULS]] 452 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $s0 453 %0(s32) = COPY $s0 454 %1(s32) = COPY $s1 455 456 %2(s32) = G_FMUL %0, %1 457 %3(s32) = G_FNEG %2 458 459 $s0 = COPY %3(s32) 460 461 BX_RET 14, $noreg, implicit $s0 462... 463--- 464name: test_vnmuls_reassociate 465legalized: true 466regBankSelected: true 467selected: false 468registers: 469 - { id: 0, class: fprb } 470 - { id: 1, class: fprb } 471 - { id: 2, class: fprb } 472 - { id: 3, class: fprb } 473body: | 474 bb.0: 475 liveins: $s0, $s1 476 477 ; CHECK-LABEL: name: test_vnmuls_reassociate 478 ; CHECK: [[COPY:%[0-9]+]]:spr = COPY $s0 479 ; CHECK: [[COPY1:%[0-9]+]]:spr = COPY $s1 480 ; CHECK: [[VNMULS:%[0-9]+]]:spr = VNMULS [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg 481 ; CHECK: $s0 = COPY [[VNMULS]] 482 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $s0 483 %0(s32) = COPY $s0 484 %1(s32) = COPY $s1 485 486 %2(s32) = G_FNEG %0 487 %3(s32) = G_FMUL %1, %2 488 489 $s0 = COPY %3(s32) 490 491 BX_RET 14, $noreg, implicit $s0 492... 493--- 494name: test_vnmuld 495legalized: true 496regBankSelected: true 497selected: false 498registers: 499 - { id: 0, class: fprb } 500 - { id: 1, class: fprb } 501 - { id: 2, class: fprb } 502 - { id: 3, class: fprb } 503body: | 504 bb.0: 505 liveins: $d0, $d1 506 507 ; CHECK-LABEL: name: test_vnmuld 508 ; CHECK: [[COPY:%[0-9]+]]:dpr = COPY $d0 509 ; CHECK: [[COPY1:%[0-9]+]]:dpr = COPY $d1 510 ; CHECK: [[VNMULD:%[0-9]+]]:dpr = VNMULD [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg 511 ; CHECK: $d0 = COPY [[VNMULD]] 512 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $d0 513 %0(s64) = COPY $d0 514 %1(s64) = COPY $d1 515 516 %2(s64) = G_FMUL %0, %1 517 %3(s64) = G_FNEG %2 518 519 $d0 = COPY %3(s64) 520 521 BX_RET 14, $noreg, implicit $d0 522... 523--- 524name: test_vfnmas 525legalized: true 526regBankSelected: true 527selected: false 528registers: 529 - { id: 0, class: fprb } 530 - { id: 1, class: fprb } 531 - { id: 2, class: fprb } 532 - { id: 3, class: fprb } 533 - { id: 4, class: fprb } 534body: | 535 bb.0: 536 liveins: $s0, $s1, $s2 537 538 ; CHECK-LABEL: name: test_vfnmas 539 ; CHECK: [[COPY:%[0-9]+]]:spr = COPY $s0 540 ; CHECK: [[COPY1:%[0-9]+]]:spr = COPY $s1 541 ; CHECK: [[COPY2:%[0-9]+]]:spr = COPY $s2 542 ; CHECK: [[VFNMAS:%[0-9]+]]:spr = VFNMAS [[COPY2]], [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg 543 ; CHECK: $s0 = COPY [[VFNMAS]] 544 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $s0 545 %0(s32) = COPY $s0 546 %1(s32) = COPY $s1 547 %2(s32) = COPY $s2 548 549 %3(s32) = G_FMA %0, %1, %2 550 %4(s32) = G_FNEG %3 551 552 $s0 = COPY %4(s32) 553 554 BX_RET 14, $noreg, implicit $s0 555... 556--- 557name: test_vfnmad 558legalized: true 559regBankSelected: true 560selected: false 561registers: 562 - { id: 0, class: fprb } 563 - { id: 1, class: fprb } 564 - { id: 2, class: fprb } 565 - { id: 3, class: fprb } 566 - { id: 4, class: fprb } 567 - { id: 5, class: fprb } 568body: | 569 bb.0: 570 liveins: $d0, $d1, $d2 571 572 ; CHECK-LABEL: name: test_vfnmad 573 ; CHECK: [[COPY:%[0-9]+]]:dpr = COPY $d0 574 ; CHECK: [[COPY1:%[0-9]+]]:dpr = COPY $d1 575 ; CHECK: [[COPY2:%[0-9]+]]:dpr = COPY $d2 576 ; CHECK: [[VFNMAD:%[0-9]+]]:dpr = VFNMAD [[COPY2]], [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg 577 ; CHECK: $d0 = COPY [[VFNMAD]] 578 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $d0 579 %0(s64) = COPY $d0 580 %1(s64) = COPY $d1 581 %2(s64) = COPY $d2 582 583 %3(s64) = G_FNEG %0 584 %4(s64) = G_FNEG %2 585 %5(s64) = G_FMA %3, %1, %4 586 587 $d0 = COPY %5(s64) 588 589 BX_RET 14, $noreg, implicit $d0 590... 591--- 592name: test_vfmss 593legalized: true 594regBankSelected: true 595selected: false 596registers: 597 - { id: 0, class: fprb } 598 - { id: 1, class: fprb } 599 - { id: 2, class: fprb } 600 - { id: 3, class: fprb } 601 - { id: 4, class: fprb } 602body: | 603 bb.0: 604 liveins: $s0, $s1, $s2 605 606 ; CHECK-LABEL: name: test_vfmss 607 ; CHECK: [[COPY:%[0-9]+]]:spr = COPY $s0 608 ; CHECK: [[COPY1:%[0-9]+]]:spr = COPY $s1 609 ; CHECK: [[COPY2:%[0-9]+]]:spr = COPY $s2 610 ; CHECK: [[VFMSS:%[0-9]+]]:spr = VFMSS [[COPY2]], [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg 611 ; CHECK: $s0 = COPY [[VFMSS]] 612 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $s0 613 %0(s32) = COPY $s0 614 %1(s32) = COPY $s1 615 %2(s32) = COPY $s2 616 617 %3(s32) = G_FNEG %0 618 %4(s32) = G_FMA %3, %1, %2 619 620 $s0 = COPY %4(s32) 621 622 BX_RET 14, $noreg, implicit $s0 623... 624--- 625name: test_vfmsd 626legalized: true 627regBankSelected: true 628selected: false 629registers: 630 - { id: 0, class: fprb } 631 - { id: 1, class: fprb } 632 - { id: 2, class: fprb } 633 - { id: 3, class: fprb } 634 - { id: 4, class: fprb } 635body: | 636 bb.0: 637 liveins: $d0, $d1, $d2 638 639 ; CHECK-LABEL: name: test_vfmsd 640 ; CHECK: [[COPY:%[0-9]+]]:dpr = COPY $d0 641 ; CHECK: [[COPY1:%[0-9]+]]:dpr = COPY $d1 642 ; CHECK: [[COPY2:%[0-9]+]]:dpr = COPY $d2 643 ; CHECK: [[VFMSD:%[0-9]+]]:dpr = VFMSD [[COPY2]], [[COPY1]], [[COPY]], 14 /* CC::al */, $noreg 644 ; CHECK: $d0 = COPY [[VFMSD]] 645 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $d0 646 %0(s64) = COPY $d0 647 %1(s64) = COPY $d1 648 %2(s64) = COPY $d2 649 650 %3(s64) = G_FNEG %1 651 %4(s64) = G_FMA %0, %3, %2 652 653 $d0 = COPY %4(s64) 654 655 BX_RET 14, $noreg, implicit $d0 656... 657--- 658name: test_vfnmss 659legalized: true 660regBankSelected: true 661selected: false 662registers: 663 - { id: 0, class: fprb } 664 - { id: 1, class: fprb } 665 - { id: 2, class: fprb } 666 - { id: 3, class: fprb } 667 - { id: 4, class: fprb } 668body: | 669 bb.0: 670 liveins: $s0, $s1, $s2 671 672 ; CHECK-LABEL: name: test_vfnmss 673 ; CHECK: [[COPY:%[0-9]+]]:spr = COPY $s0 674 ; CHECK: [[COPY1:%[0-9]+]]:spr = COPY $s1 675 ; CHECK: [[COPY2:%[0-9]+]]:spr = COPY $s2 676 ; CHECK: [[VFNMSS:%[0-9]+]]:spr = VFNMSS [[COPY2]], [[COPY]], [[COPY1]], 14 /* CC::al */, $noreg 677 ; CHECK: $s0 = COPY [[VFNMSS]] 678 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $s0 679 %0(s32) = COPY $s0 680 %1(s32) = COPY $s1 681 %2(s32) = COPY $s2 682 683 %3(s32) = G_FNEG %2 684 %4(s32) = G_FMA %0, %1, %3 685 686 $s0 = COPY %4(s32) 687 688 BX_RET 14, $noreg, implicit $s0 689... 690--- 691name: test_bfc 692legalized: true 693regBankSelected: true 694selected: false 695registers: 696 - { id: 0, class: gprb } 697 - { id: 1, class: gprb } 698 - { id: 2, class: gprb } 699body: | 700 bb.0: 701 liveins: $r0 702 703 ; CHECK-LABEL: name: test_bfc 704 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 705 ; CHECK: [[BFC:%[0-9]+]]:gpr = BFC [[COPY]], -65529, 14 /* CC::al */, $noreg 706 ; CHECK: $r0 = COPY [[BFC]] 707 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 708 %0(s32) = COPY $r0 709 %1(s32) = G_CONSTANT i32 -65529 ; 0xFFFF0007 710 %2(s32) = G_AND %0, %1 711 712 $r0 = COPY %2(s32) 713 714 BX_RET 14, $noreg, implicit $r0 715... 716--- 717name: test_no_bfc_bad_mask 718legalized: true 719regBankSelected: true 720selected: false 721registers: 722 - { id: 0, class: gprb } 723 - { id: 1, class: gprb } 724 - { id: 2, class: gprb } 725body: | 726 bb.0: 727 liveins: $r0 728 729 ; CHECK-LABEL: name: test_no_bfc_bad_mask 730 ; CHECK: [[COPY:%[0-9]+]]:gpr = COPY $r0 731 ; CHECK: [[ANDri:%[0-9]+]]:gpr = ANDri [[COPY]], 6, 14 /* CC::al */, $noreg, $noreg 732 ; CHECK: $r0 = COPY [[ANDri]] 733 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0 734 %0(s32) = COPY $r0 735 %1(s32) = G_CONSTANT i32 6 ; 0x00000006 736 %2(s32) = G_AND %0, %1 737 738 $r0 = COPY %2(s32) 739 740 BX_RET 14, $noreg, implicit $r0 741... 742