Make sure to remove the Select instruction as well
authorChris Lattner <sabre@nondot.org>
Sat, 18 Sep 2004 00:32:40 +0000 (00:32 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 18 Sep 2004 00:32:40 +0000 (00:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16389 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/PromoteMemoryToRegister.cpp

index f4161fff31fc7cf523c0caaba6fefd206368eacc..b4214ee09bd65a70428f3826844c238093b4509a 100644 (file)
@@ -247,6 +247,7 @@ void PromoteMem2Reg::run() {
           AST->copyValue(Load, FalseVal);
           AST->copyValue(Load, NewSI);
           AST->deleteValue(Load);
+          AST->deleteValue(SI);
         }
 
         Load->replaceAllUsesWith(NewSI);