Skip to content

Commit

Permalink
Fix an undefined behavior introduces in r247234
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247296 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
cachemeifyoucan committed Sep 10, 2015
1 parent a77744d commit d4c5df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d4c5df7

Please sign in to comment.