If a select's condition is a AND/OR, we can unswitch invariant operands.
This patch uses existing logic from unswitching AND/OR's for branch
conditions.
This patch also fixes the Cost computation for unswitching selects to have
selects/guards to have the cost of the entire loop, since unswitching selects do not remove
selects/guards do not remove branches.branches. This is required for this patch because otherwise, This is required for this patchthere are
because otherwise, there are cases where unswitching selects of AND/OR is beating out unswitching of
is beating out unswitching of branchebranches.
This patch also prevents unswitching of logical AND/OR selects. This
should instead be done by unswitching of AND/OR branch conditions.