diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-07-06 19:24:47 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-07-06 19:24:47 +0000 |
commit | a501be556f2a9a677bf772f6328e13fb006ac1dc (patch) | |
tree | 89c43cc630af2ea29b3b78f245da28866a8d40c9 /llvm/lib | |
parent | 0e0fe8a2e9b8d36fdc9f8db3519825a72e131157 (diff) | |
download | bcm5719-llvm-a501be556f2a9a677bf772f6328e13fb006ac1dc.tar.gz bcm5719-llvm-a501be556f2a9a677bf772f6328e13fb006ac1dc.zip |
It doesn't matter what the 2nd operand is; if the GEP has 2 operands and
the first is a zero, we should leave it alone.
llvm-svn: 14648
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp b/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp index bcd0f78aba2..72e537a7dcd 100644 --- a/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp +++ b/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp @@ -83,8 +83,7 @@ static inline bool isZeroConst (Value *V) { bool llvm::DecomposeArrayRef(GetElementPtrInst* GEP) { if (GEP->getNumIndices() < 2 || (GEP->getNumIndices() == 2 - && isZeroConst(GEP->getOperand(1)) - && isa<ConstantInt>(GEP->getOperand(2)))) { + && isZeroConst(GEP->getOperand(1)))) { DEBUG (std::cerr << "DecomposeArrayRef: Skipping " << *GEP); return false; } else { |