summaryrefslogtreecommitdiff
path: root/lib
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
commit90960280ee79987f53b4952793a867143145a36a (patch)
tree6f5edc974cd87d748ea1100c43db65fbb6fb4e13 /lib
parentc2feb5c2622c132077b157c3056f8f1ffe0cf13b (diff)
downloadllvm-90960280ee79987f53b4952793a867143145a36a.tar.gz
llvm-90960280ee79987f53b4952793a867143145a36a.tar.bz2
llvm-90960280ee79987f53b4952793a867143145a36a.tar.xz
Fix an overly strict assertion. Source register of a copy may not be killed, it may be killed by an implicit super-register use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/VirtRegMap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index 890ecf984c..4fd0ad44b0 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/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);
}