[AMDGPU] Disassembler: Support for sdwa instructions
Reviewers: vpykhtin, tstellarAMD
Subscribers: arsenm, kzhuravl
Differential Revision: http://reviews.llvm.org/D21129
llvm-svn: 272255
diff --git a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
index a76c0de..f96bb5e 100644
--- a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+++ b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
@@ -125,11 +125,15 @@
// ToDo: better to switch encoding length using some bit predicate
// but it is unknown yet, so try all we can
- // Try to decode DPP first to solve conflict with VOP1 and VOP2 encodings
+ // Try to decode DPP and SDWA first to solve conflict with VOP1 and VOP2
+ // encodings
if (Bytes.size() >= 8) {
const uint64_t QW = eatBytes<uint64_t>(Bytes);
Res = tryDecodeInst(DecoderTableDPP64, MI, QW, Address);
if (Res) break;
+
+ Res = tryDecodeInst(DecoderTableSDWA64, MI, QW, Address);
+ if (Res) break;
}
// Reinitialize Bytes as DPP64 could have eaten too much