Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.

llvm-svn: 67719
diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
index e93d448..98e5cc1 100644
--- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
@@ -673,6 +673,7 @@
 
   while (!WorkList.empty()) {
     BasicBlock *BB = WorkList.back(); WorkList.pop_back();
+    LPM->deleteSimpleAnalysisValue(BB, LP);
     for(BasicBlock::iterator BBI = BB->begin(), BBE = BB->end(); 
         BBI != BBE; ) {
       Instruction *I = BBI;
@@ -680,7 +681,6 @@
       I->replaceAllUsesWith(UndefValue::get(I->getType()));
       I->eraseFromParent();
     }
-    LPM->deleteSimpleAnalysisValue(BB, LP);
     DT->eraseNode(BB);
     DF->removeBlock(BB);
     LI->removeBlock(BB);