summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocFast.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-07-10 16:56:52 +0000
committerAdrian Prantl <aprantl@apple.com>2013-07-10 16:56:52 +0000
commit43ae5e85f829df883dd364c0b9612bbe90f3ad97 (patch)
treeb04749c2ff51c2584dc88ebc46d892249626485b /lib/CodeGen/RegAllocFast.cpp
parent4759f26c31d5544c5e1c13edb8ab013be9a95338 (diff)
downloadllvm-43ae5e85f829df883dd364c0b9612bbe90f3ad97.tar.gz
llvm-43ae5e85f829df883dd364c0b9612bbe90f3ad97.tar.bz2
llvm-43ae5e85f829df883dd364c0b9612bbe90f3ad97.tar.xz
Use the appropriate unsigned int type for the offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocFast.cpp')
-rw-r--r--lib/CodeGen/RegAllocFast.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/RegAllocFast.cpp b/lib/CodeGen/RegAllocFast.cpp
index cd8b66469f..58d00da014 100644
--- a/lib/CodeGen/RegAllocFast.cpp
+++ b/lib/CodeGen/RegAllocFast.cpp
@@ -299,7 +299,7 @@ void RAFast::spillVirtReg(MachineBasicBlock::iterator MI,
MachineInstr *DBG = LRIDbgValues[li];
const MDNode *MDPtr = DBG->getOperand(2).getMetadata();
bool IsIndirect = DBG->getOperand(1).isImm(); // Register-indirect value?
- int64_t Offset = IsIndirect ? DBG->getOperand(1).getImm() : 0;
+ 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.
@@ -856,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();