summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/InstPrinter
diff options
context:
space:
mode:
authorDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>2017-11-17 15:15:40 +0000
committerDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>2017-11-17 15:15:40 +0000
commit682a6547582c70702e698d6263bbf78592d66084 (patch)
tree7ce19a45e803eec5de65081e5f9a139748e3b37a /llvm/lib/Target/AMDGPU/InstPrinter
parent6649665d5a1670a74f93b1efdc3bac6a21b6644a (diff)
downloadbcm5719-llvm-682a6547582c70702e698d6263bbf78592d66084.tar.gz
bcm5719-llvm-682a6547582c70702e698d6263bbf78592d66084.zip
[AMDGPU][MC][GFX9][disassembler] Corrected decoding of op_sel_hi for v_mad_mix*
See bug 35148: https://bugs.llvm.org//show_bug.cgi?id=35148 Reviewers: tamazov, SamWot, arsenm Differential Revision: https://reviews.llvm.org/D39492 llvm-svn: 318526
Diffstat (limited to 'llvm/lib/Target/AMDGPU/InstPrinter')
-rw-r--r--llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp b/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
index cd79fbe5751..537769bf27e 100644
--- a/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
+++ b/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
@@ -806,8 +806,8 @@ void AMDGPUInstPrinter::printExpTgt(const MCInst *MI, unsigned OpNo,
}
static bool allOpsDefaultValue(const int* Ops, int NumOps, int Mod,
- bool HasDstSel) {
- int DefaultValue = (Mod == SISrcMods::OP_SEL_1);
+ bool IsPacked, bool HasDstSel) {
+ int DefaultValue = IsPacked && (Mod == SISrcMods::OP_SEL_1);
for (int I = 0; I < NumOps; ++I) {
if (!!(Ops[I] & Mod) != DefaultValue)
@@ -843,7 +843,10 @@ void AMDGPUInstPrinter::printPackedModifier(const MCInst *MI,
Mod == SISrcMods::OP_SEL_0 &&
MII.get(MI->getOpcode()).TSFlags & SIInstrFlags::VOP3_OPSEL;
- if (allOpsDefaultValue(Ops, NumOps, Mod, HasDstSel))
+ const bool IsPacked =
+ MII.get(MI->getOpcode()).TSFlags & SIInstrFlags::IsPacked;
+
+ if (allOpsDefaultValue(Ops, NumOps, Mod, IsPacked, HasDstSel))
return;
O << Name;
OpenPOWER on IntegriCloud