XFAIL the test cases for r186044 on Hexagon
[oota-llvm.git] / lib / CodeGen / RegAllocFast.cpp
index 2e9c02077b08f4a8b14390037ee10092e7cc7b63..58d00da01440a4f66ffb0e9ebb68cd4583366d86 100644 (file)
@@ -298,7 +298,8 @@ void RAFast::spillVirtReg(MachineBasicBlock::iterator MI,
     for (unsigned li = 0, le = LRIDbgValues.size(); li != le; ++li) {
       MachineInstr *DBG = LRIDbgValues[li];
       const MDNode *MDPtr = DBG->getOperand(2).getMetadata();
-      int64_t Offset = DBG->getOperand(1).getImm();
+      bool IsIndirect = DBG->getOperand(1).isImm(); // Register-indirect value?
+      uint64_t Offset = IsIndirect ? DBG->getOperand(1).getImm() : 0;
       DebugLoc DL;
       if (MI == MBB->end()) {
         // If MI is at basic block end then use last instruction's location.
@@ -855,7 +856,8 @@ void RAFast::AllocateBasicBlock() {
             }
             else {
               // Modify DBG_VALUE now that the value is in a spill slot.
-              int64_t Offset = MI->getOperand(1).getImm();
+              bool IsIndirect = MI->getOperand(1).isImm();
+              uint64_t Offset = IsIndirect ? MI->getOperand(1).getImm() : 0;
               const MDNode *MDPtr =
                 MI->getOperand(MI->getNumOperands()-1).getMetadata();
               DebugLoc DL = MI->getDebugLoc();