From 90960280ee79987f53b4952793a867143145a36a Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 4 Sep 2008 05:43:55 +0000 Subject: [PATCH] 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 --- lib/CodeGen/VirtRegMap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.34.1