This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, ia64]: Fix PR 51681, ICE in gcc.dg/torture/vshuf-v2si.c (+ more)


On Mon, Jan 2, 2012 at 9:31 PM, Richard Henderson <rth@redhat.com> wrote:
> 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;

I tried to investigate -mbig-endian a bit, but unfortunately almost
all gcc.dg/torture/vshuf-*.c tests FAIL with -O2 on unpatched gcc.
Tests pass with -O0, though.

Due to this, I committed only the obvious part of the patch, that is:

2012-01-02  Uros Bizjak  <ubizjak@gmail.com>

       * config/ia64/ia64.c (expand_vec_perm_broadcast): Use correct
       operands for extzv pattern.

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]