Fix a LocalSpiller leak. This fixes tramp3d-v4.
authorDan Gohman <gohman@apple.com>
Fri, 18 Jul 2008 18:28:56 +0000 (18:28 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 18 Jul 2008 18:28:56 +0000 (18:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53766 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/VirtRegMap.cpp

index 7696d55efa577009da7a425f263c5a35c035cff9..b9e96b11e2928f9f0adf0d4eaf8aa6826c48f943 100644 (file)
@@ -971,6 +971,7 @@ bool LocalSpiller::PrepForUnfoldOpti(MachineBasicBlock &MBB,
         InvalidateKills(MI, RegKills, KillOps);
         VRM.RemoveMachineInstrFromMaps(&MI);
         MBB.erase(&MI);
+        MF.DeleteMachineInstr(NewMI);
         return true;
       }
       MF.DeleteMachineInstr(NewMI);