This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, ia64]: Fix PR 51681, ICE in gcc.dg/torture/vshuf-v2si.c (+ more)
- From: Richard Henderson <rth at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 03 Jan 2012 07:31:16 +1100
- Subject: Re: [PATCH, ia64]: Fix PR 51681, ICE in gcc.dg/torture/vshuf-v2si.c (+ more)
- References: <CAFULd4YLMkqhHroVogJbC3_GPdCKPxB3JkE2M8m37rB6-tJaaw@mail.gmail.com>
On 01/03/2012 06:47 AM, Uros Bizjak wrote:
> if (d->testing_p)
> return true;
>
> + hi = shift < nelt ? d->op1 : d->op0;
> + lo = shift < nelt ? d->op0 : d->op1;
> +
> + shift %= nelt;
This bit only works for little-endian. It's why I had that assert
for shift range 1-63, for one thing.
I guess an extra check for big-endian before the loop could fix that.
I.e.
shift = d->perm[0];
+ if (BYTES_BIG_ENDIAN && shift > nelt)
+ return false;
r~