Remove an optimization that isn't.
authorChris Lattner <sabre@nondot.org>
Wed, 21 Aug 2002 22:10:06 +0000 (22:10 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 21 Aug 2002 22:10:06 +0000 (22:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3419 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp

index 657640471a11b3b8e7ed49cc961468570b8f0abe..7bfa329b57ca8637caa4314610c079511d2d3b5c 100644 (file)
@@ -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;
   }