https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110817
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
_5 = VEC_COND_EXPR <_9, { 0, 0 }, { -1, -1 }>;
_6 = VIEW_CONVERT_EXPR<long unsigned intD.10>(_5);
>From that veclower produces:
<signed-boolean:32> _36;
_36 = BIT_FIELD_REF <_9, 32, 0>;
_37 = _36 != 0;
_38 = _36 == 0;
_39 = (signed int) _38;
_40 = (signed int) _36;
_41 = _40 + -1;
_42 = BIT_FIELD_REF <_9, 32, 32>;
_43 = _42 != 0;
_44 = _42 == 0;
_45 = (signed int) _44;
_46 = (signed int) _42;
_47 = _46 + -1;
_5 = {_41, _47};
_6 = VIEW_CONVERT_EXPR<long unsigned intD.10>(_5);
Which looks wrong. that is
_38 = _36 == 0;
_40 = (signed int) _36;
_41 = _40 + -1;
_36 == 0 ? 0 : -1
which is the wrong way around ...
GCC 13 veclower produced:
<signed-boolean:32> _32;
_32 = BIT_FIELD_REF <_7, 32, 0>;
_33 = (_BoolD.2306) _32;
_34 = ~_33;
_35 = (intD.6) _34;
_36 = _32 & 1;
_37 = (intD.6) _36;
_38 = _37 + -1;
Which is: (_32 & 1) ? 0 : - 1;