]> granicus.if.org Git - llvm/commit
[LoopSimplifyCFG] Pay respect to LCSSA when removing dead blocks
authorMax Kazantsev <max.kazantsev@azul.com>
Tue, 12 Feb 2019 07:48:07 +0000 (07:48 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Tue, 12 Feb 2019 07:48:07 +0000 (07:48 +0000)
commitce2d739dc13f65a54460e326c97c3c86717647b5
treeee2296229a42558e0ffa84917aaae0e369aa0f1b
parent056e9a4188c8d635832fa0538a7a7a3daee6546a
[LoopSimplifyCFG] Pay respect to LCSSA when removing dead blocks

Utility function that we use for blocks deletion always unconditionally removes
one-input Phis. In LoopSimplifyCFG, it can lead to breach of LCSSA form.
This patch alters this function to keep them if needed.

Differential Revision: https://reviews.llvm.org/D57231
Reviewed By: fedor.sergeev

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353803 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopSimplifyCFG.cpp
test/Transforms/LoopSimplifyCFG/lcssa.ll