Hi,
In AArch64 backend, If the conditions of vselect are vector constant, then the value of "true" is presented as (i8 1) instead of (i8 255) which we expect.
The reason is, vselect only accept vxi1 as condition operand while BSL use every bit of condition to make select. So legalizer will insert a sign_extend_inreg to promote vxi1 to vxi8. Next DAGCombiner will use visitSIGN_EXTEND_INREG() to combine it with a build_vector. Because in AArch64, i8 is illegal, constants with i1 are directly promoted to i32, so for i32, left shift 7 and then arithmetic right shift 7 can't correctly sign_extend i1 to i8.