From: Chris Lattner Date: Sat, 18 Sep 2004 00:32:40 +0000 (+0000) Subject: Make sure to remove the Select instruction as well X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=afbb1ccd2f20bf85385f2c88a6b534a1be3acae1;p=oota-llvm.git Make sure to remove the Select instruction as well git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16389 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index f4161fff31f..b4214ee09bd 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -247,6 +247,7 @@ void PromoteMem2Reg::run() { AST->copyValue(Load, FalseVal); AST->copyValue(Load, NewSI); AST->deleteValue(Load); + AST->deleteValue(SI); } Load->replaceAllUsesWith(NewSI);