llvm/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-frame-index.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
# RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s

---
name: test_frame_index_p5
legalized:       true
stack:
  - { id: 0, offset: 0, size: 4, alignment: 4 }
body: |
  bb.0:
    ; CHECK-LABEL: name: test_frame_index_p5
    ; CHECK: [[FRAME_INDEX:%[0-9]+]]:sgpr(p5) = G_FRAME_INDEX %stack.0
    %0:_(p5) = G_FRAME_INDEX %stack.0

...

---
name: test_frame_index_p5_sgpr_use
legalized:       true
stack:
  - { id: 0, offset: 0, size: 4, alignment: 4 }
body: |
  bb.0:
    ; CHECK-LABEL: name: test_frame_index_p5_sgpr_use
    ; CHECK: [[FRAME_INDEX:%[0-9]+]]:sgpr(p5) = G_FRAME_INDEX %stack.0
    ; CHECK-NEXT: $sgpr0 = COPY [[FRAME_INDEX]](p5)
    %0:_(p5) = G_FRAME_INDEX %stack.0
    $sgpr0 = COPY %0

...

---
name: test_frame_index_p5_vgpr_use
legalized:       true
stack:
  - { id: 0, offset: 0, size: 4, alignment: 4 }
body: |
  bb.0:
    ; CHECK-LABEL: name: test_frame_index_p5_vgpr_use
    ; CHECK: [[FRAME_INDEX:%[0-9]+]]:sgpr(p5) = G_FRAME_INDEX %stack.0
    ; CHECK-NEXT: $vgpr0 = COPY [[FRAME_INDEX]](p5)
    %0:_(p5) = G_FRAME_INDEX %stack.0
    $vgpr0 = COPY %0

...