mass elimination of reliance on automatic iterator dereferencing
[oota-llvm.git] / lib / Transforms / Scalar / LoopIndexSplit.cpp
index c3a387071d4b4057acd4c48823c498926119ef76..2a52c99a59c1afd1c13c4be1a101799e739c3d3c 100644 (file)
@@ -1183,7 +1183,7 @@ bool LoopIndexSplit::cleanBlock(BasicBlock *BB) {
     bool usedOutsideBB = false;
     for (Value::use_iterator UI = I->use_begin(), UE = I->use_end(); 
          UI != UE; ++UI) {
-      Instruction *U = cast<Instruction>(UI);
+      Instruction *U = cast<Instruction>(*UI);
       if (U->getParent() != BB)
         usedOutsideBB = true;
     }