[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Evan Cheng evan.cheng at apple.com
Tue Mar 27 18:56:09 PDT 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.398 -> 1.399
---
Log message:

Scale 1 is always ok.

---
Diffs of the changes:  (+1 -1)

 SelectionDAGISel.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.398 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.399
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.398	Tue Mar 27 20:49:39 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Tue Mar 27 20:55:52 2007
@@ -4137,7 +4137,7 @@
           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;






More information about the llvm-commits mailing list