From c08f5fe882d6d2f2f94606b4f4ea8a1209cb1e24 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Tue, 1 Sep 2009 22:19:00 +0000 Subject: [PATCH] Move use of LV inside condition that guards for null LV. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80731 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/TwoAddressInstructionPass.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index d75396906e1..b0310048ec1 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -865,12 +865,12 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { LV->addVirtualRegisterKilled(Kill, NewKill); } } - } - // We're really going to nuke the old inst. If regB was marked - // as a kill we need to update its Kills list. - if (mi->getOperand(si).isKill()) - LV->removeVirtualRegisterKilled(regB, mi); + // We're really going to nuke the old inst. If regB was marked + // as a kill we need to update its Kills list. + if (mi->getOperand(si).isKill()) + LV->removeVirtualRegisterKilled(regB, mi); + } mbbi->erase(mi); // Nuke the old inst. mi = nmi; -- 2.34.1