Skip to content

Commit

Permalink
[AMDGPU] Stop special casing flat_scratch for register name
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D64885

llvm-svn: 366376
  • Loading branch information
rampitec committed Jul 17, 2019
1 parent f45fd42 commit 9c7f426
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1347,18 +1347,6 @@ void SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
}

StringRef SIRegisterInfo::getRegAsmName(unsigned Reg) const {
// FIXME: Rename flat_scr so we don't need to special case this.
switch (Reg) {
case AMDGPU::FLAT_SCR:
return "flat_scratch";
case AMDGPU::FLAT_SCR_LO:
return "flat_scratch_lo";
case AMDGPU::FLAT_SCR_HI:
return "flat_scratch_hi";
default:
break;
}

const TargetRegisterClass *RC = getMinimalPhysRegClass(Reg);
unsigned Size = getRegSizeInBits(*RC);
unsigned AltName = AMDGPU::NoRegAltName;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/AMDGPU/SIRegisterInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ foreach Index = 0-15 in {
multiclass FLAT_SCR_LOHI_m <string n, bits<16> ci_e, bits<16> vi_e> {
def _ci : SIReg<n, ci_e>;
def _vi : SIReg<n, vi_e>;
def "" : SIReg<"", 0>;
def "" : SIReg<n, 0>;
}

class FlatReg <Register lo, Register hi, bits<16> encoding> :
Expand Down

0 comments on commit 9c7f426

Please sign in to comment.