projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix undefined behavior (left shift of negative value) in SystemZ backend.
[oota-llvm.git]
/
lib
/
Target
/
SystemZ
/
SystemZFrameLowering.cpp
diff --git
a/lib/Target/SystemZ/SystemZFrameLowering.cpp
b/lib/Target/SystemZ/SystemZFrameLowering.cpp
index db1a005353b1cec43b7d84a03e55f3088a2acd56..eff4ae3baf3f506682f68d49941ac39682e5a8e3 100644
(file)
--- a/
lib/Target/SystemZ/SystemZFrameLowering.cpp
+++ b/
lib/Target/SystemZ/SystemZFrameLowering.cpp
@@
-294,7
+294,7
@@
static void emitIncrement(MachineBasicBlock &MBB,
else {
Opcode = SystemZ::AGFI;
// Make sure we maintain 8-byte stack alignment.
- int64_t MinVal = -int64_t(1) << 31;
+ int64_t MinVal = -
u
int64_t(1) << 31;
int64_t MaxVal = (int64_t(1) << 31) - 8;
if (ThisVal < MinVal)
ThisVal = MinVal;