llvm/llvm/test/CodeGen/AArch64/sve-aliasing.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -o - %s -mtriple=aarch64 -run-pass=machine-scheduler -verify-machineinstrs | FileCheck %s

---
name:            scalable_v16i1
tracksRegLiveness: true
registers:
  - { id: 0, class: gpr64common, preferred-register: '' }
  - { id: 1, class: ppr, preferred-register: '' }
  - { id: 2, class: ppr, preferred-register: '' }
liveins:
  - { reg: '$x0', virtual-reg: '%0' }
  - { reg: '$p0', virtual-reg: '%1' }
body:             |
  bb.0:
    liveins: $x0, $p0

    ; CHECK-LABEL: name: scalable_v16i1
    ; CHECK: liveins: $x0, $p0
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
    ; CHECK-NEXT: [[LDR_PXI:%[0-9]+]]:ppr = LDR_PXI [[COPY]], 1 :: (load unknown-size, align 16)
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:ppr = COPY $p0
    ; CHECK-NEXT: $p0 = COPY [[LDR_PXI]]
    ; CHECK-NEXT: STR_PXI [[COPY1]], [[COPY]], 0 :: (store unknown-size, align 16)
    ; CHECK-NEXT: RET_ReallyLR implicit $p0
    %1:ppr = COPY $p0
    %0:gpr64common = COPY $x0
    STR_PXI %1, %0, 0 :: (store unknown-size, align 16)
    %2:ppr = LDR_PXI %0, 1 :: (load unknown-size, align 16)
    $p0 = COPY %2
    RET_ReallyLR implicit $p0

...
---
name:            scalable_neg_v16i1
tracksRegLiveness: true
registers:
  - { id: 0, class: gpr64common, preferred-register: '' }
  - { id: 1, class: ppr, preferred-register: '' }
  - { id: 2, class: ppr, preferred-register: '' }
liveins:
  - { reg: '$x0', virtual-reg: '%0' }
  - { reg: '$p0', virtual-reg: '%1' }
body:             |
  bb.0:
    liveins: $x0, $p0

    ; CHECK-LABEL: name: scalable_neg_v16i1
    ; CHECK: liveins: $x0, $p0
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x0
    ; CHECK-NEXT: [[LDR_PXI:%[0-9]+]]:ppr = LDR_PXI [[COPY]], -1 :: (load unknown-size, align 16)
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:ppr = COPY $p0
    ; CHECK-NEXT: $p0 = COPY [[LDR_PXI]]
    ; CHECK-NEXT: STR_PXI [[COPY1]], [[COPY]], 0 :: (store unknown-size, align 16)
    ; CHECK-NEXT: RET_ReallyLR implicit $p0
    %1:ppr = COPY $p0
    %0:gpr64common = COPY $x0
    STR_PXI %1, %0, 0 :: (store unknown-size, align 16)
    %2:ppr = LDR_PXI %0, -1 :: (load unknown-size, align 16)
    $p0 = COPY %2
    RET_ReallyLR implicit $p0

...