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
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.
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, implicit $exec :: (load (s32), addrspace 5)
16 name: reserve_correct_register
17 tracksRegLiveness: true
20 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
21 frameOffsetReg: '$sgpr50'
23 - { id: 0, type: default, offset: 0, size: 4, alignment: 4 }
27 renamable $vgpr0 = BUFFER_LOAD_DWORD_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr50, 4, 0, 0, implicit $exec :: (load (s32), addrspace 5)