HomePhabricator

[LoopSimplifyCFG] Pay respect to LCSSA when removing dead blocks

Authored by mkazantsev on Feb 11 2019, 11:48 PM.

Description

[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

llvm-svn: 353803