inst-select-frame-index.mir 899 Bytes
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -march=amdgcn -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefix=GCN

---

name: frame_index_s
legalized:       true
regBankSelected: true
stack:
  - { id: 0, size: 4, alignment: 4 }

body: |
  bb.0:
    ; GCN-LABEL: name: frame_index_s
    ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 %stack.0
    ; GCN: $sgpr0 = COPY [[S_MOV_B32_]]
    %0:sgpr(p5) = G_FRAME_INDEX %stack.0
    $sgpr0 = COPY %0

...

---

name: frame_index_v
legalized:       true
regBankSelected: true
stack:
  - { id: 0, size: 4, alignment: 4 }

body: |
  bb.0:
    ; GCN-LABEL: name: frame_index_v
    ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 %stack.0, implicit $exec
    ; GCN: $vgpr0 = COPY [[V_MOV_B32_e32_]]
    %0:vgpr(p5) = G_FRAME_INDEX %stack.0
    $vgpr0 = COPY %0

...