Normalize
select(C0, select(C1, a, b), b) -> select((C0 & C1), a, b)
select(C0, a, select(C1, a, b)) -> select((C0 | C1), a, b)
This form may enabled further combines on the And and Or part
conditions. For most targets the select sequence is actually preferable
though, a followup patch will change DAGCombine to go back to the previous
form.
The other reason this helps, which I think is worth mentioning, is that GetUnderlyingObjects (which is used both at the IR level proper in several places, and also used on MMOs by the instruction scheduler) only looks back through a fixed number of PHIs and selects. Thus, reducing the select depth makes several things more powerful "for free".