mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
R600/SI: Handle VCC in SIRegisterInfo::getPhysRegSubReg()
This fixes a crash in an ocl conformance test. The test requries register spilling and is too big to include. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216216 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3fd7e37b34
commit
a07c0778ca
@ -148,6 +148,17 @@ const TargetRegisterClass *SIRegisterInfo::getSubRegClass(
|
||||
unsigned SIRegisterInfo::getPhysRegSubReg(unsigned Reg,
|
||||
const TargetRegisterClass *SubRC,
|
||||
unsigned Channel) const {
|
||||
|
||||
switch (Reg) {
|
||||
case AMDGPU::VCC:
|
||||
switch(Channel) {
|
||||
case 0: return AMDGPU::VCC_LO;
|
||||
case 1: return AMDGPU::VCC_HI;
|
||||
default: llvm_unreachable("Invalid SubIdx for VCC");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
unsigned Index = getHWRegIndex(Reg);
|
||||
return SubRC->getRegister(Index + Channel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user