Fix breakage on ARM/2008-04-10-ScavengerAssert.ll.
authorOwen Anderson <resistor@mac.com>
Tue, 5 Aug 2008 22:24:40 +0000 (22:24 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 5 Aug 2008 22:24:40 +0000 (22:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54378 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/UnreachableBlockElim.cpp

index ca682fd65a0a7d53c66e87512d3d199cad55ce4b..f1e3aabaebed68c551fd705bcb6c669019ee4ef5 100644 (file)
@@ -137,7 +137,8 @@ bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) {
             start++;
             phi->eraseFromParent();
             
-            F.getRegInfo().replaceRegWith(Output, Input);
+            if (Input != Output)
+              F.getRegInfo().replaceRegWith(Output, Input);
           } else
             start++;
         }