On Fri, 2023-07-07 at 08:15 +0200, Richard Biener wrote:
/* snip */
> > + bool sign_ext = (!TYPE_UNSIGNED (TREE_TYPE (bf_ref)) &&
> > + TYPE_PRECISION (ret_type) > mask_width);
> > + bool widening = ((TYPE_PRECISION (TREE_TYPE (container)) <
> > + TYPE_PRECISI
On Thu, Jul 6, 2023 at 6:18 PM Xi Ruoyao via Gcc-patches
wrote:
>
> If a bit-field is signed and it's wider than the output type, we must
> ensure the extracted result sign-extended. But this was not handled
> correctly.
>
> For example:
>
> int x : 8;
> long y : 55;
> bool z : 1;
>
>
If a bit-field is signed and it's wider than the output type, we must
ensure the extracted result sign-extended. But this was not handled
correctly.
For example:
int x : 8;
long y : 55;
bool z : 1;
The vectorized extraction of y was:
vect__ifc__49.29_110 =
MEM [(struct I