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
4 # Previously getReservedRegs was called before parsing
5 # machineFunctionInfo, but the AMDGPU implementation depends on
6 # setting register fields to reserve there. $sgpr50 would then not be
7 # reserved, resulting in a verifier error from an undefined register.
10 # CHECK: machineFunctionInfo:
11 # CHECK: isEntryFunction: true
12 # CHECK: scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
13 # CHECK: scratchWaveOffsetReg: '$sgpr50'
14 # CHECK: frameOffsetReg: '$sgpr50'
15 # CHECK: renamable $vgpr0 = BUFFER_LOAD_DWORD_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr50, 4, 0, 0, 0, 0, implicit $exec :: (load 4, addrspace 5)
16 name: reserve_correct_register
17 tracksRegLiveness: true
20 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
21 scratchWaveOffsetReg: '$sgpr50'
22 frameOffsetReg: '$sgpr50'
24 - { id: 0, type: default, offset: 0, size: 4, alignment: 4 }
28 renamable $vgpr0 = BUFFER_LOAD_DWORD_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr50, 4, 0, 0, 0, 0, implicit $exec :: (load 4, addrspace 5)