summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-09-04 05:43:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-09-04 05:43:55 +0000
commit93d40ae1e1ff6df90066e8ad6bb76fd6a4e09f9f (patch)
tree5b96c995eb730b772fc4d6f4d77a7445034785f1 /llvm/lib/CodeGen/VirtRegMap.cpp
parentc01f56c8de151c82d958e10fa59f54dc85e9623c (diff)
downloadbcm5719-llvm-93d40ae1e1ff6df90066e8ad6bb76fd6a4e09f9f.tar.gz
bcm5719-llvm-93d40ae1e1ff6df90066e8ad6bb76fd6a4e09f9f.zip
Fix an overly strict assertion. Source register of a copy may not be killed, it may be killed by an implicit super-register use.
llvm-svn: 55762
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index 890ecf984c6..4fd0ad44b05 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -1730,7 +1730,8 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
SmallVector<unsigned, 2> KillRegs;
InvalidateKills(MI, RegKills, KillOps, &KillRegs);
if (MO.isDead() && !KillRegs.empty()) {
- assert(KillRegs[0] == Dst);
+ // Source register or an implicit super-register use is killed.
+ assert(KillRegs[0] == Dst || TRI->isSubRegister(KillRegs[0], Dst));
// Last def is now dead.
TransferDeadness(&MBB, Dist, Src, RegKills, KillOps);
}
OpenPOWER on IntegriCloud