HomePhabricator

[FlattenCFG] Fix `MergeIfRegion` in case then-path is empty

Authored by ekatz on May 21 2020, 4:06 AM.

Description

[FlattenCFG] Fix MergeIfRegion in case then-path is empty

In case the then-path of an if-region is empty, then merging with the
else-path should be handled with the inverse of the condition (leading
to that path).

Fix PR37662

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

Details