HomePhabricator

[Jump Threading] Unfold a select insn that feeds a switch via a phi node

Description

[Jump Threading] Unfold a select insn that feeds a switch via a phi node

Currently when a select has a constant value in one branch and the select feeds
a conditional branch (via a compare/ phi and compare) we unfold the select
statement. This results in threading the conditional branch later on. Similar
opportunity exists when a select (with a constant in one branch) feeds a
switch (via a phi node). The patch unfolds select under this condition.
A testcase is provided.

Details

Committed
amehsanJan 11 2019, 7:52 AM
Parents
rL350930: Don't use the form '2017y' in tests, since some gcc versions don't allow it
Branches
Unknown
Tags
Unknown