diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-03-28 01:55:52 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-28 01:55:52 +0000 |
commit | 4388043b250795b567b10a486f682636db4ddd79 (patch) | |
tree | d2b3899f3cf5204d0049f035ea3db0d4f75c2699 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | c2cba18f2b2e32fce5044a065aa8fcf634d64c20 (diff) | |
download | bcm5719-llvm-4388043b250795b567b10a486f682636db4ddd79.tar.gz bcm5719-llvm-4388043b250795b567b10a486f682636db4ddd79.zip |
Scale 1 is always ok.
llvm-svn: 35407
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 68510156125..d906263a5ba 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -4137,7 +4137,7 @@ static bool SinkInvariantGEPIndex(BinaryOperator *BinOp, int64_t Cst = cast<ConstantInt>(BinOp->getOperand(1))->getSExtValue(); // e.g. load (gep i32 * %P, (X+42)) => load (%P + X*4 + 168). if (TLI.isLegalAddressImmediate(Cst*Scale, UseTy) && - TLI.isLegalAddressScale(Scale, UseTy)) { + (Scale == 1 || TLI.isLegalAddressScale(Scale, UseTy))) { DestBBs.insert(GEPIBB); MadeChange = true; break; |