[llvm-commits] CVS: llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Tue Jul 6 14:26:02 PDT 2004


Changes in directory llvm/lib/Transforms/Scalar:

DecomposeMultiDimRefs.cpp updated: 1.33 -> 1.34

---
Log message:

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.


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

Index: llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp
diff -u llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp:1.33 llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp:1.34
--- llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp:1.33	Tue Jul  6 13:15:39 2004
+++ llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp	Tue Jul  6 14:24:47 2004
@@ -83,8 +83,7 @@
 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 {





More information about the llvm-commits mailing list