Optimize vector select from all 0s or all 1s