HomePhabricator

[LowerSwitch] Fixed faulty PHI nodes

Description

[LowerSwitch] Fixed faulty PHI nodes

Summary:
Fixed two cases of where PHI nodes need to be updated by lowerswitch.

When lowerswitch find out that the switch default branch is not
reachable it remove the old default and replace it with the most
popular block from the cases, but it forget to update the PHI
nodes in the default block.

The PHI nodes also need to be updated when the switch is replaced
with a single branch.

Reviewers: hans, reames, arsenm

Reviewed By: arsenm

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

Details

Committed
karkaJul 10 2018, 5:06 AM
Reviewer
arsenm
Differential Revision
D47203: [LowerSwitch] Fixed faulty PHI node in switch default block
Parents
rL336658: Fixing builtin __atomic_fetch_min declaration
Branches
Unknown
Tags
Unknown