diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-07-13 00:44:29 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-07-13 00:44:29 +0000 |
commit | 5cf2ee1f80e0d4c5c1ecb0717f3d9baefe7619e1 (patch) | |
tree | 4f52d140439a2e5abfce60a45634f5aadd1f3a5e /lib/Target/X86/X86RegisterInfo.cpp | |
parent | e721f5c8d3ea2cc2cc8c3c308ce8bdd8a3fc3b32 (diff) | |
download | external_llvm-5cf2ee1f80e0d4c5c1ecb0717f3d9baefe7619e1.zip external_llvm-5cf2ee1f80e0d4c5c1ecb0717f3d9baefe7619e1.tar.gz external_llvm-5cf2ee1f80e0d4c5c1ecb0717f3d9baefe7619e1.tar.bz2 |
Add an assert (which should never trigger) that triggers on a testcase I'm looking at.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86RegisterInfo.cpp')
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 3d65faa..d5e7dbf 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -730,7 +730,9 @@ X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, if (MI.getOperand(i+3).isImm()) { // Offset is a 32-bit integer. - int Offset = FIOffset + (int)(MI.getOperand(i + 3).getImm()); + int Imm = (int)(MI.getOperand(i + 3).getImm()); + int Offset = FIOffset + Imm; + assert(isInt<32>((long long)FIOffset + Imm) && "Overflowing offset!"); MI.getOperand(i + 3).ChangeToImmediate(Offset); } else { // Offset is symbolic. This is extremely rare. |