[llvm] r269475 - AMDGPU/R600: There are other uses for ALU_LITERAL besides Imm
Jan Vesely via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 13:39:20 PDT 2016
Author: jvesely
Date: Fri May 13 15:39:20 2016
New Revision: 269475
URL: http://llvm.org/viewvc/llvm-project?rev=269475&view=rev
Log:
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
Modified:
llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp?rev=269475&r1=269474&r2=269475&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp Fri May 13 15:39:20 2016
@@ -337,10 +337,13 @@ R600InstrInfo::getSrcs(MachineInstr *MI)
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));
}
More information about the llvm-commits
mailing list