Re: [Patch ARM] Fix off by one error in neon_evpc_vrev.

2012-05-29 Thread Richard Henderson
On 05/26/2012 01:27 AM, Ramana Radhakrishnan wrote: - for (i = 0; i nelt; i += diff) + for (i = 0; i nelt ; i += (diff + 1)) for (j = 0; j= diff; j += 1) - if (d-perm[i + j] != i + diff - j) - return false; + { + /* This is guaranteed to be true as the value of

Re: [Patch ARM] Fix off by one error in neon_evpc_vrev.

2012-05-29 Thread Ramana Radhakrishnan
On 29 May 2012 18:30, Richard Henderson r...@redhat.com wrote: On 05/26/2012 01:27 AM, Ramana Radhakrishnan wrote: -  for (i = 0; i  nelt; i += diff) +  for (i = 0; i  nelt ; i += (diff + 1))      for (j = 0; j= diff; j += 1) -      if (d-perm[i + j] != i + diff - j) -       return false;

[Patch ARM] Fix off by one error in neon_evpc_vrev.

2012-05-26 Thread Ramana Radhakrishnan
Hi, There is an off by one error in neon_evpc_vrev which means it rarely gets triggerred. The problem is that if you are looking at d-perm [i +j] and you increment i by just diff you end up starting looking where you looked at the end of the last place where you checked. Given this I