diff options
| author | Ivan Kosarev <ivan.kosarev@amd.com> | 2024-07-25 18:44:44 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-25 16:44:44 +0100 |
| commit | 24a18aafa337b70a5a6c30f077bddc64e8677b48 (patch) | |
| tree | 1e72eda9db309f979a1de092767df10d29ea9be2 /llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp | |
| parent | a27f816fe56af9cc7f4f296ad6c577f6ea64349f (diff) | |
[AMDGPU] Simplify printing row/bank_mask modifiers. (#100575)
And fix a codegen test to use mask values that fit their encoding
fields.
Part of <https://github.com/llvm/llvm-project/issues/62629>.
Diffstat (limited to 'llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp index 983f3c430f7b..fc7aba3483aa 100644 --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp @@ -47,12 +47,6 @@ void AMDGPUInstPrinter::printInst(const MCInst *MI, uint64_t Address, printAnnotation(OS, Annot); } -void AMDGPUInstPrinter::printU4ImmOperand(const MCInst *MI, unsigned OpNo, - const MCSubtargetInfo &STI, - raw_ostream &O) { - O << formatHex(MI->getOperand(OpNo).getImm() & 0xf); -} - void AMDGPUInstPrinter::printU16ImmOperand(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { @@ -1149,15 +1143,13 @@ void AMDGPUInstPrinter::printDPPCtrl(const MCInst *MI, unsigned OpNo, void AMDGPUInstPrinter::printDppRowMask(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { - O << " row_mask:"; - printU4ImmOperand(MI, OpNo, STI, O); + O << " row_mask:" << formatHex(MI->getOperand(OpNo).getImm()); } void AMDGPUInstPrinter::printDppBankMask(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { - O << " bank_mask:"; - printU4ImmOperand(MI, OpNo, STI, O); + O << " bank_mask:" << formatHex(MI->getOperand(OpNo).getImm()); } void AMDGPUInstPrinter::printDppBoundCtrl(const MCInst *MI, unsigned OpNo, |
