diff options
Diffstat (limited to 'lib/Target/AMDGPU/AMDGPUMCInstLower.cpp')
| -rw-r--r-- | lib/Target/AMDGPU/AMDGPUMCInstLower.cpp | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp b/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp index da247fea7de6..f1ef6281c90f 100644 --- a/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp +++ b/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp @@ -126,9 +126,15 @@ bool AMDGPUMCInstLower::lowerOperand(const MachineOperand &MO,  }  void AMDGPUMCInstLower::lower(const MachineInstr *MI, MCInst &OutMI) const { +  unsigned Opcode = MI->getOpcode(); -  int MCOpcode = ST.getInstrInfo()->pseudoToMCOpcode(MI->getOpcode()); +  // FIXME: Should be able to handle this with emitPseudoExpansionLowering. We +  // need to select it to the subtarget specific version, and there's no way to +  // do that with a single pseudo source operation. +  if (Opcode == AMDGPU::S_SETPC_B64_return) +    Opcode = AMDGPU::S_SETPC_B64; +  int MCOpcode = ST.getInstrInfo()->pseudoToMCOpcode(Opcode);    if (MCOpcode == -1) {      LLVMContext &C = MI->getParent()->getParent()->getFunction()->getContext();      C.emitError("AMDGPUMCInstLower::lower - Pseudo instruction doesn't have "  | 
