summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-05-27 05:04:51 +0000
committerCameron Zwarich <zwarich@apple.com>2011-05-27 05:04:51 +0000
commit34ef49dc74e68f9364c1e14195bd19f9232927fc (patch)
treebec102a7495c5168f0e0f1118630c30fd35ed3ee /llvm/lib
parent43a421e3d5e5384cca1b5fe88b138e3d7c5255be (diff)
downloadbcm5719-llvm-34ef49dc74e68f9364c1e14195bd19f9232927fc.tar.gz
bcm5719-llvm-34ef49dc74e68f9364c1e14195bd19f9232927fc.zip
Fix PR10029 - VerifyCoalescing failure on patterns_dfa.c of 445.gobmk.
llvm-svn: 132181
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/UnreachableBlockElim.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/UnreachableBlockElim.cpp b/llvm/lib/CodeGen/UnreachableBlockElim.cpp
index 48d8ab1658d..52693f03e82 100644
--- a/llvm/lib/CodeGen/UnreachableBlockElim.cpp
+++ b/llvm/lib/CodeGen/UnreachableBlockElim.cpp
@@ -196,8 +196,11 @@ bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) {
temp->eraseFromParent();
ModifiedPHI = true;
- if (Input != Output)
- F.getRegInfo().replaceRegWith(Output, Input);
+ if (Input != Output) {
+ MachineRegisterInfo &MRI = F.getRegInfo();
+ MRI.constrainRegClass(Input, MRI.getRegClass(Output));
+ MRI.replaceRegWith(Output, Input);
+ }
continue;
}
OpenPOWER on IntegriCloud