summaryrefslogtreecommitdiff
path: root/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp')
-rw-r--r--lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp b/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp
index 274400aa34a..0ef0a9c2ad7 100644
--- a/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp
+++ b/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp
@@ -216,8 +216,8 @@ void R600MCCodeEmitter::EmitALUInstr(const MCInst &MI,
//older alu have different encoding for instructions with one or two src
//parameters.
- if (STI.getFeatureBits() & AMDGPU::FeatureR600ALUInst &&
- MI.getNumOperands() < 4) {
+ if ((STI.getFeatureBits() & AMDGPU::FeatureR600ALUInst) &&
+ !(MCDesc.TSFlags & R600_InstFlag::OP3)) {
uint64_t ISAOpCode = InstWord01 & (0x3FFULL << 39);
InstWord01 &= ~(0x3FFULL << 39);
InstWord01 |= ISAOpCode << 1;