diff options
-rw-r--r-- | lib/CodeGen/UnreachableBlockElim.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/UnreachableBlockElim.cpp b/lib/CodeGen/UnreachableBlockElim.cpp index ca682fd..f1e3aab 100644 --- a/lib/CodeGen/UnreachableBlockElim.cpp +++ b/lib/CodeGen/UnreachableBlockElim.cpp @@ -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++; } |