Converting a phi to select can prevent some function simplification optimizations from happening (e.g. both GVN and GVNHoist can understand phis but not selects) so it's worthwhile to delay doing this conversion until after these optimisations have happened.
Details
Details
Diff Detail
Diff Detail