Fix bug in previous checkin
[oota-llvm.git] / lib / CodeGen / InstrSelection / InstrSelectionSupport.cpp
index 8c38a8f436bb2f273e1a12272e682c7f17ce51ec..4413a25655b5e7453074939c5aff1894cbc1da79 100644 (file)
@@ -433,7 +433,8 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
       if (mop.getType() == MachineOperand::MO_VirtualRegister)
         {
           assert(mop.getVRegValue() != NULL);
-          if (Constant *opConst = dyn_cast<Constant>(mop.getVRegValue())) {
+          opValue = mop.getVRegValue();
+          if (Constant *opConst = dyn_cast<Constant>(opValue)) {
             opType = ChooseRegOrImmed(opConst, opCode, target,
                                       (immedPos == (int)op), machineRegNum,
                                       immedValue);