HomePhabricator

[LoopSimplifyCFG] Don't delete LCSSA Phis

Description

[LoopSimplifyCFG] Don't delete LCSSA Phis

When removing edges, we also update Phi inputs and may end up removing
a Phi if it has only one input. We should not do it for edges that leave the current
loop because these Phis are LCSSA Phis and need to be preserved.

Thanks @dmgreen for finding this!

Differential Revision: https://reviews.llvm.org/D54841

Details

Committed
mkazantsevNov 22 2018, 11:56 PM
Differential Revision
D54841: [LoopSimplifyCFG] Don't delete LCSSA Phis
Parents
rL347483: [NFC] Add verification flags to tests
Branches
Unknown
Tags
Unknown