RecursivelyDeleteTriviallyDeadInstructions only needs a
[oota-llvm.git] / lib / Transforms / Scalar / Reassociate.cpp
index 6a0fb3f7789e995d314f513615f64ce0e70b1bbc..accabb024ddd4536f9eb51d222002b500c29e19e 100644 (file)
@@ -1097,9 +1097,8 @@ bool Reassociate::runOnFunction(Function &F) {
 
   // Now that we're done, delete any instructions which are no longer used.
   while (!DeadInsts.empty())
-    if (Instruction *Inst =
-          cast_or_null<Instruction>((Value *)DeadInsts.pop_back_val()))
-      RecursivelyDeleteTriviallyDeadInstructions(Inst);
+    if (Value *V = DeadInsts.pop_back_val())
+      RecursivelyDeleteTriviallyDeadInstructions(V);
 
   // We are done with the rank map.
   RankMap.clear();