diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-08-21 22:10:06 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-08-21 22:10:06 +0000 |
| commit | 6f66bc80163fe87216150b2d4f91d92425fd7d87 (patch) | |
| tree | c078d1506d44192838d58416ffca10e742629e27 /llvm/lib/Transforms | |
| parent | f75c333d241169c36540fd73868fbe1e18027b06 (diff) | |
| download | bcm5719-llvm-6f66bc80163fe87216150b2d4f91d92425fd7d87.tar.gz bcm5719-llvm-6f66bc80163fe87216150b2d4f91d92425fd7d87.zip | |
Remove an optimization that isn't.
llvm-svn: 3419
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp b/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp index 657640471a1..7bfa329b57c 100644 --- a/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp +++ b/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp @@ -88,13 +88,15 @@ IsZero(Value* idx) bool DecomposePass::decomposeArrayRef(BasicBlock::iterator &BBI) { + // FIXME: If condition below MemAccessInst &MAI = cast<MemAccessInst>(*BBI); + // FIXME: If condition below - // If this instr two or fewer arguments and the first argument is 0, - // the decomposed version is identical to the instruction itself. - // This is common enough that it is worth checking for explicitly... - if (MAI.getNumIndices() == 0 || - (MAI.getNumIndices() <= 2 && IsZero(*MAI.idx_begin()))) { + // If this instr has no indexes, then the decomposed version is identical to + // the instruction itself. FIXME: this should go away once GEP is the only + // MAI + // + if (MAI.getNumIndices() == 0) { ++BBI; return false; } |

