diff options
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r-- | lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp index 76ff182e18..86dde076dd 100644 --- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp +++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp @@ -471,7 +471,7 @@ FixConstantOperandsForInstr(Instruction* vmInstr, MachineOpCode opCode = minstr->getOpCode(); const MachineInstrInfo& instrInfo = target.getInstrInfo(); - const MachineInstrDescriptor& instrDesc = instrInfo.getDescriptor(opCode); + int resultPos = instrInfo.getResultPos(opCode); int immedPos = instrInfo.getImmedConstantPos(opCode); Function *F = vmInstr->getParent()->getParent(); @@ -482,7 +482,7 @@ FixConstantOperandsForInstr(Instruction* vmInstr, // Skip the result position, preallocated machine registers, or operands // that cannot be constants (CC regs or PC-relative displacements) - if (instrDesc.resultPos == (int) op || + if (resultPos == (int)op || mop.getType() == MachineOperand::MO_MachineRegister || mop.getType() == MachineOperand::MO_CCRegister || mop.getType() == MachineOperand::MO_PCRelativeDisp) |