Skip to content

Commit 9c7f426

Browse files
committed
[AMDGPU] Stop special casing flat_scratch for register name
Differential Revision: https://reviews.llvm.org/D64885 llvm-svn: 366376
1 parent f45fd42 commit 9c7f426

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -1347,18 +1347,6 @@ void SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
13471347
}
13481348

13491349
StringRef SIRegisterInfo::getRegAsmName(unsigned Reg) const {
1350-
// FIXME: Rename flat_scr so we don't need to special case this.
1351-
switch (Reg) {
1352-
case AMDGPU::FLAT_SCR:
1353-
return "flat_scratch";
1354-
case AMDGPU::FLAT_SCR_LO:
1355-
return "flat_scratch_lo";
1356-
case AMDGPU::FLAT_SCR_HI:
1357-
return "flat_scratch_hi";
1358-
default:
1359-
break;
1360-
}
1361-
13621350
const TargetRegisterClass *RC = getMinimalPhysRegClass(Reg);
13631351
unsigned Size = getRegSizeInBits(*RC);
13641352
unsigned AltName = AMDGPU::NoRegAltName;

llvm/lib/Target/AMDGPU/SIRegisterInfo.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ foreach Index = 0-15 in {
171171
multiclass FLAT_SCR_LOHI_m <string n, bits<16> ci_e, bits<16> vi_e> {
172172
def _ci : SIReg<n, ci_e>;
173173
def _vi : SIReg<n, vi_e>;
174-
def "" : SIReg<"", 0>;
174+
def "" : SIReg<n, 0>;
175175
}
176176

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

0 commit comments

Comments
 (0)