Do not look at dead phis during SsaRedundantPhiElimination.

Otherwise, we may replace a dead loop phi with its incoming input.
This broke an assumption during liveness analysis in the presence
of irreducible loops.

bug:28256552
Change-Id: Ia9e82026555e6b7f6a2cd37df4b765cd3684079d
diff --git a/compiler/optimizing/ssa_phi_elimination.cc b/compiler/optimizing/ssa_phi_elimination.cc
index aeb3109..0978ae1 100644
--- a/compiler/optimizing/ssa_phi_elimination.cc
+++ b/compiler/optimizing/ssa_phi_elimination.cc
@@ -139,8 +139,9 @@
       continue;
     }
 
-    if (phi->InputCount() == 0) {
-      DCHECK(phi->IsDead());
+    // If the phi is dead, we know we won't revive it and it will be removed,
+    // so don't process it.
+    if (phi->IsDead()) {
       continue;
     }