Skip to content

Commit

Permalink
AMDGPU/R600: There are other uses for ALU_LITERAL besides Imm
Browse files Browse the repository at this point in the history
This will be used for GV

Reviewers: tstellard

Subscribers: arsenm

Differential Revision: http://reviews.llvm.org/D19788

llvm-svn: 269475
  • Loading branch information
jvesely committed May 13, 2016
1 parent fbcb754 commit fac8d7e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
Expand Up @@ -337,10 +337,13 @@ R600InstrInfo::getSrcs(MachineInstr *MI) const {
continue;
}
if (Reg == AMDGPU::ALU_LITERAL_X) {
MachineOperand &Imm = MI->getOperand(
MachineOperand &Operand = MI->getOperand(
getOperandIdx(MI->getOpcode(), AMDGPU::OpName::literal));
Result.push_back(std::make_pair(&MO, Imm.getImm()));
continue;
if (Operand.isImm()) {
Result.push_back(std::make_pair(&MO, Operand.getImm()));
continue;
}
assert(Operand.isGlobal());
}
Result.push_back(std::make_pair(&MO, 0));
}
Expand Down

0 comments on commit fac8d7e

Please sign in to comment.