Fix breakage on ARM/2008-04-10-ScavengerAssert.ll.

llvm-svn: 54378
diff --git a/llvm/lib/CodeGen/UnreachableBlockElim.cpp b/llvm/lib/CodeGen/UnreachableBlockElim.cpp
index ca682fd..f1e3aab 100644
--- a/llvm/lib/CodeGen/UnreachableBlockElim.cpp
+++ b/llvm/lib/CodeGen/UnreachableBlockElim.cpp
@@ -137,7 +137,8 @@
             start++;
             phi->eraseFromParent();
             
-            F.getRegInfo().replaceRegWith(Output, Input);
+            if (Input != Output)
+              F.getRegInfo().replaceRegWith(Output, Input);
           } else
             start++;
         }