[LoopPred] Delete the old condition expressions if unused
authorPhilip Reames <listmail@philipreames.com>
Mon, 1 Apr 2019 16:05:15 +0000 (16:05 +0000)
committerPhilip Reames <listmail@philipreames.com>
Mon, 1 Apr 2019 16:05:15 +0000 (16:05 +0000)
commitd109e2a7c3b7602c92e1fd92884876a28b68fd78
tree299d5cd55fd5fcc8031d8baae391aeeef3719892
parentdae5ff2b7b8e0eedea2d7cc6b767e83a57d997b1
[LoopPred] Delete the old condition expressions if unused

LoopPredication was replacing the original condition, but leaving the instructions to compute the old conditions around.  This would get cleaned up by other passes of course, but we might as well do it eagerly.  That also makes the test output less confusing.

llvm-svn: 357406
llvm/lib/Transforms/Scalar/LoopPredication.cpp
llvm/test/Transforms/LoopPredication/basic.ll
llvm/test/Transforms/LoopPredication/basic_widenable_branch_guards.ll
llvm/test/Transforms/LoopPredication/invariant_load.ll
llvm/test/Transforms/LoopPredication/nested.ll
llvm/test/Transforms/LoopPredication/profitability.ll
llvm/test/Transforms/LoopPredication/reverse.ll
llvm/test/Transforms/LoopPredication/visited.ll
llvm/test/Transforms/LoopPredication/widened.ll