On Sun, May 23, 2021 at 6:14 AM Marc Glisse <marc.gli...@inria.fr> wrote:
>
> On Sun, 23 May 2021, apinski--- via Gcc-patches wrote:
>
> > +(for cmp (ge lt)
> > +/* x < 0 ? ~y : y into (x >> (prec-1)) ^ y. */
> > +/* x >= 0 ? ~y : y into ~((x >> (prec-1)) ^ y). */
> > + (simplify
> > +  (cond (cmp @0 integer_zerop) (bit_not @1) @1)
> > +   (if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
> > +        && !TYPE_UNSIGNED (TREE_TYPE (@0))
> > +        && TYPE_PRECISION (TREE_TYPE (@0)) == TYPE_PRECISION (type))
>
> Is there a risk that x is signed char (precision 8) and y is a vector with
> 8 elements?

Yes there should be a check for "INTEGRAL_TYPE_P (type)" there too.  I
had missed it when I was doing the conversion.  I will add it and
resubmit the patch.

Thanks,
Andrew

>
> --
> Marc Glisse

Reply via email to