AMDGPU/R600: There are other uses for ALU_LITERAL besides Imm

This will be used for GV

Reviewers: tstellard

Subscribers: arsenm

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

llvm-svn: 269475
This commit is contained in:
Jan Vesely 2016-05-13 20:39:20 +00:00
parent fbcb754e66
commit fac8d7ecb1

View File

@ -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));
}