summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2015-09-10 16:32:28 +0000
committerSteven Wu <stevenwu@apple.com>2015-09-10 16:32:28 +0000
commite3b1f2b7658ea22b13d6bae34f5ac4c9f4dc8fc6 (patch)
tree561a0ec43f54a1add20e991b0e5aaada0e6db853 /llvm/lib
parent9361d355252eee5f5edff50140166e87db0446cb (diff)
downloadbcm5719-llvm-e3b1f2b7658ea22b13d6bae34f5ac4c9f4dc8fc6.tar.gz
bcm5719-llvm-e3b1f2b7658ea22b13d6bae34f5ac4c9f4dc8fc6.zip
Fix an undefined behavior introduces in r247234
llvm-svn: 247296
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
index afacfa5c90f..6c538c9741d 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
@@ -646,7 +646,7 @@ bool AArch64DAGToDAGISel::SelectAddrModeIndexed7S(SDValue N, unsigned Size,
if (ConstantSDNode *RHS = dyn_cast<ConstantSDNode>(N.getOperand(1))) {
int64_t RHSC = RHS->getSExtValue();
unsigned Scale = Log2_32(Size);
- if ((RHSC & (Size - 1)) == 0 && RHSC >= (-0x40 << Scale) &&
+ if ((RHSC & (Size - 1)) == 0 && RHSC >= -(0x40 << Scale) &&
RHSC < (0x40 << Scale)) {
Base = N.getOperand(0);
if (Base.getOpcode() == ISD::FrameIndex) {
OpenPOWER on IntegriCloud