summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2015-04-08 01:09:19 +0000
committerTom Stellard <thomas.stellard@amd.com>2015-04-08 01:09:19 +0000
commit1f3416a63ddef8fee1411c3d15d3c036e50300c2 (patch)
treec69556e12a7723c528554eb9ee3957d7d61ac47c /llvm/lib
parent0e6a26467324d31194899d4698f4a563645942ee (diff)
downloadbcm5719-llvm-1f3416a63ddef8fee1411c3d15d3c036e50300c2.tar.gz
bcm5719-llvm-1f3416a63ddef8fee1411c3d15d3c036e50300c2.zip
R600/SI: Don't print offset0/offset1 DS operands when they are 0
llvm-svn: 234379
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp b/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
index d5898d6594e..b73a9b268e8 100644
--- a/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
+++ b/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
@@ -89,14 +89,18 @@ void AMDGPUInstPrinter::printDSOffset(const MCInst *MI, unsigned OpNo,
void AMDGPUInstPrinter::printDSOffset0(const MCInst *MI, unsigned OpNo,
raw_ostream &O) {
- O << " offset0:";
- printU8ImmDecOperand(MI, OpNo, O);
+ if (MI->getOperand(OpNo).getImm()) {
+ O << " offset0:";
+ printU8ImmDecOperand(MI, OpNo, O);
+ }
}
void AMDGPUInstPrinter::printDSOffset1(const MCInst *MI, unsigned OpNo,
raw_ostream &O) {
- O << " offset1:";
- printU8ImmDecOperand(MI, OpNo, O);
+ if (MI->getOperand(OpNo).getImm()) {
+ O << " offset1:";
+ printU8ImmDecOperand(MI, OpNo, O);
+ }
}
void AMDGPUInstPrinter::printGDS(const MCInst *MI, unsigned OpNo,
OpenPOWER on IntegriCloud