Skip to content

Commit c62f208

Browse files
committed
[AMDGPU] Don't suppress printing the .l and .h register suffixes.
We don't seem to have a use for the -amdgpu-keep-16-bit-reg-suffixes option anymore. Was introduced in <https://reviews.llvm.org/D79435>. Reviewed By: Joe_Nash, foad Differential Revision: https://reviews.llvm.org/D156102
1 parent 0cb3530 commit c62f208

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
using namespace llvm;
2525
using namespace llvm::AMDGPU;
2626

27-
static cl::opt<bool> Keep16BitSuffixes(
28-
"amdgpu-keep-16-bit-reg-suffixes",
29-
cl::desc("Keep .l and .h suffixes in asm for debugging purposes"),
30-
cl::init(false),
31-
cl::ReallyHidden);
32-
3327
void AMDGPUInstPrinter::printRegName(raw_ostream &OS, MCRegister Reg) const {
3428
// FIXME: The current implementation of
3529
// AsmParser::parseRegisterOrRegisterNumber in MC implies we either emit this
@@ -278,12 +272,7 @@ void AMDGPUInstPrinter::printRegOperand(unsigned RegNo, raw_ostream &O,
278272
}
279273
#endif
280274

281-
StringRef RegName(getRegisterName(RegNo));
282-
if (!Keep16BitSuffixes)
283-
if (!RegName.consume_back(".l"))
284-
RegName.consume_back(".h");
285-
286-
O << RegName;
275+
O << getRegisterName(RegNo);
287276
}
288277

289278
void AMDGPUInstPrinter::printVOPDst(const MCInst *MI, unsigned OpNo,

llvm/test/CodeGen/AMDGPU/lo16-hi16-illegal-copy.mir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# RUN: not llc -march=amdgcn -mcpu=gfx802 -start-before postrapseudos -asm-verbose=0 -amdgpu-keep-16-bit-reg-suffixes -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefixes=ERR,GFX8-ERR %s
2-
# RUN: not llc -march=amdgcn -mcpu=gfx802 -start-before postrapseudos -asm-verbose=0 -amdgpu-keep-16-bit-reg-suffixes -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefix=GCN %s
3-
# RUN: not llc -march=amdgcn -mcpu=gfx900 -start-before postrapseudos -asm-verbose=0 -amdgpu-keep-16-bit-reg-suffixes -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefix=ERR %s
4-
# RUN: not llc -march=amdgcn -mcpu=gfx900 -start-before postrapseudos -asm-verbose=0 -amdgpu-keep-16-bit-reg-suffixes -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefixes=GCN,GFX9 %s
1+
# RUN: not llc -march=amdgcn -mcpu=gfx802 -start-before postrapseudos -asm-verbose=0 -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefixes=ERR,GFX8-ERR %s
2+
# RUN: not llc -march=amdgcn -mcpu=gfx802 -start-before postrapseudos -asm-verbose=0 -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefix=GCN %s
3+
# RUN: not llc -march=amdgcn -mcpu=gfx900 -start-before postrapseudos -asm-verbose=0 -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefix=ERR %s
4+
# RUN: not llc -march=amdgcn -mcpu=gfx900 -start-before postrapseudos -asm-verbose=0 -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefixes=GCN,GFX9 %s
55

66
# Note: GFX8 did not allow SDWA SGPR sources. Therefor no HI16 subregs can be used there.
77

0 commit comments

Comments
 (0)