XFAIL the test cases for r186044 on Hexagon
[oota-llvm.git] / lib / CodeGen / InlineSpiller.cpp
index 2ab58a721ba9af54d23621e38916983547b88b7a..8910652c40bbe95cc640e0e9479185f5df8f1736 100644 (file)
@@ -1152,7 +1152,8 @@ void InlineSpiller::spillAroundUses(unsigned Reg) {
     // Debug values are not allowed to affect codegen.
     if (MI->isDebugValue()) {
       // Modify DBG_VALUE now that the value is in a spill slot.
-      uint64_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(2).getMetadata();
       DebugLoc DL = MI->getDebugLoc();
       DEBUG(dbgs() << "Modifying debug info due to spill:" << "\t" << *MI);