• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -march=amdgcn -run-pass=none -verify-machineinstrs -o - %s | FileCheck %s
2# RUN: llc -march=amdgcn  -run-pass mir-canonicalizer -verify-machineinstrs -o - %s
3# RUN: llc -march=amdgcn  -run-pass mir-canonicalizer -mir-vreg-namer-use-stable-hash -verify-machineinstrs -o - %s
4
5# Previously getReservedRegs was called before parsing
6# machineFunctionInfo, but the AMDGPU implementation depends on
7# setting register fields to reserve there. $sgpr50 would then not be
8# reserved, resulting in a verifier error from an undefined register.
9
10---
11# CHECK: machineFunctionInfo:
12# CHECK: isEntryFunction: true
13# CHECK: scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
14# CHECK: frameOffsetReg:  '$sgpr50'
15# CHECK: renamable $vgpr0 = BUFFER_LOAD_DWORD_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr50, 4, 0, 0, 0, 0, 0, implicit $exec :: (load 4, addrspace 5)
16name: reserve_correct_register
17tracksRegLiveness: true
18machineFunctionInfo:
19  isEntryFunction: true
20  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
21  frameOffsetReg:  '$sgpr50'
22stack:
23  - { id: 0, type: default, offset: 0, size: 4, alignment: 4 }
24
25body:             |
26  bb.0:
27    renamable $vgpr0 = BUFFER_LOAD_DWORD_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr50, 4, 0, 0, 0, 0, 0, implicit $exec :: (load 4, addrspace 5)
28    S_ENDPGM 0
29...
30