From: Evan Cheng Date: Thu, 4 Sep 2008 05:43:55 +0000 (+0000) Subject: Fix an overly strict assertion. Source register of a copy may not be killed, it may... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=90960280ee79987f53b4952793a867143145a36a;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 890ecf984c6..4fd0ad44b05 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -1730,7 +1730,8 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) { SmallVector 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); }