aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2009-04-16 12:34:53 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2009-04-16 12:34:53 +0000
commit7c36683fa33afe91da0b5e08ca3064c633dc3f77 (patch)
tree1e1cdb5f716c80e0c0e41314e881cdb45597f4cb /lib/Target/X86
parentbfc0104c762e385ce2b834e264b447be884c1c90 (diff)
downloadexternal_llvm-7c36683fa33afe91da0b5e08ca3064c633dc3f77.zip
external_llvm-7c36683fa33afe91da0b5e08ca3064c633dc3f77.tar.gz
external_llvm-7c36683fa33afe91da0b5e08ca3064c633dc3f77.tar.bz2
fix PR3995. A scale must be 1, 2, 4 or 8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/X86ISelDAGToDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp
index 18a574f..4b698ce 100644
--- a/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -1041,7 +1041,7 @@ bool X86DAGToDAGISel::MatchAddress(SDValue N, X86ISelAddressMode &AM,
// a scaled index.
if (Shift.getOpcode() == ISD::SRL && Shift.hasOneUse()) {
unsigned ScaleLog = 8 - C1->getZExtValue();
- if (ScaleLog > 0 && ScaleLog < 64 &&
+ if (ScaleLog > 0 && ScaleLog < 4 &&
C2->getZExtValue() == (UINT64_C(0xff) << ScaleLog)) {
SDValue Eight = CurDAG->getConstant(8, MVT::i8);
SDValue Mask = CurDAG->getConstant(0xff, N.getValueType());