[PATCH] D63272: AMDGPU: Fix printing trailing whitespace after s_endpgm
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 07:57:15 PDT 2019
arsenm created this revision.
arsenm added reviewers: dstuttard, dp.
Herald added subscribers: t-tye, tpr, yaxunl, nhaehnle, wdng, jvesely, kzhuravl.
https://reviews.llvm.org/D63272
Files:
lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
lib/Target/AMDGPU/SOPInstructions.td
test/MC/AMDGPU/s_endpgm.s
Index: test/MC/AMDGPU/s_endpgm.s
===================================================================
--- test/MC/AMDGPU/s_endpgm.s
+++ test/MC/AMDGPU/s_endpgm.s
@@ -1,17 +1,18 @@
+// RUN: llvm-mc -arch=amdgcn %s | FileCheck -strict-whitespace %s -check-prefix=WHITESPACE
// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s --check-prefix=GCN
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -filetype=obj %s | llvm-objcopy -S -K keep_symbol - | llvm-objdump -disassemble -mcpu=gfx900 - | FileCheck %s --check-prefix=BIN
+// WHITESPACE: s_endpgm{{$}}
// GCN: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
// BIN: s_endpgm // 000000000000: BF810000
s_endpgm
+// WHITESPACE: s_endpgm{{$}}
// GCN: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
// BIN: s_endpgm // 000000000004: BF810000
s_endpgm 0
-
+// WHITESPACE: s_endpgm 1{{$}}
// GCN: s_endpgm 1 ; encoding: [0x01,0x00,0x81,0xbf]
// BIN: s_endpgm 1 // 000000000008: BF810001
s_endpgm 1
-
-
Index: lib/Target/AMDGPU/SOPInstructions.td
===================================================================
--- lib/Target/AMDGPU/SOPInstructions.td
+++ lib/Target/AMDGPU/SOPInstructions.td
@@ -919,7 +919,7 @@
let isTerminator = 1 in {
-def S_ENDPGM : SOPP <0x00000001, (ins EndpgmImm:$simm16), "s_endpgm $simm16"> {
+def S_ENDPGM : SOPP <0x00000001, (ins EndpgmImm:$simm16), "s_endpgm$simm16"> {
let isBarrier = 1;
let isReturn = 1;
}
Index: lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
===================================================================
--- lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
+++ lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
@@ -1349,7 +1349,7 @@
return;
}
- O << formatDec(Imm);
+ O << ' ' << formatDec(Imm);
}
#include "AMDGPUGenAsmWriter.inc"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63272.204540.patch
Type: text/x-patch
Size: 1799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190613/a434cc5c/attachment.bin>
More information about the llvm-commits
mailing list