llvm/llvm/test/CodeGen/ARM/pr60908.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
# RUN: llc -mtriple=armv7 -run-pass=machine-cp %s -o - | FileCheck %s

# Positive test: $d15 has sub-register $s30, which should be propagated.
---
name:            test_d15
tracksRegLiveness: true
liveins:
  - { reg: '$d15' }
body:             |
  bb.0.entry:
    liveins: $d15

    ; CHECK-LABEL: name: test_d15
    ; CHECK: liveins: $d15
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: $s0 = COPY $s30
    ; CHECK-NEXT: BX_RET 14 /* CC::al */, $noreg, implicit killed $s0
    renamable $d14 = COPY killed $d15
    $s0 = COPY killed renamable $s28
    BX_RET 14 /* CC::al */, $noreg, implicit killed $s0

...

# Negative test: $d18 does not have sub-registers.
---
name:            test_d18
tracksRegLiveness: true
liveins:
  - { reg: '$d18' }
body:             |
  bb.0.entry:
    liveins: $d18

    ; CHECK-LABEL: name: test_d18
    ; CHECK: liveins: $d18
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: renamable $d14 = COPY killed $d18
    ; CHECK-NEXT: $s0 = COPY killed renamable $s28
    ; CHECK-NEXT: BX_RET 14 /* CC::al */, $noreg, implicit killed $s0
    renamable $d14 = COPY killed $d18
    $s0 = COPY killed renamable $s28
    BX_RET 14 /* CC::al */, $noreg, implicit killed $s0

...