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, testsuite] fix failure in test gcc.dg/vect/slp-perm-8.c


On Wed, Apr 25, 2012 at 1:51 PM, Greta Yorsh <Greta.Yorsh@arm.com> wrote:
> The test gcc.dg/vect/slp-perm-8.c fails on arm-none-eabi with neon enabled:
> FAIL: gcc.dg/vect/slp-perm-8.c scan-tree-dump-times vect "vectorized 1
> loops" 2
>
> The test expects 2 loops to be vectorized, while gcc successfully vectorizes
> 3 loops in this test using neon on arm. This patch adjusts the expected
> output. Fixed test passes on qemu for arm and powerpc.
>
> OK for trunk?

I think the proper fix is to instead of

  for (i = 0; i < N; i++)
    {
      input[i] = i;
      output[i] = 0;
      if (input[i] > 256)
        abort ();
    }

use

  for (i = 0; i < N; i++)
    {
      input[i] = i;
      output[i] = 0;
      __asm__ volatile ("");
    }

to prevent vectorization of initialization loops.

> Thanks,
> Greta
>
> gcc/testsuite/ChangeLog
>
> 2012-04-23 ?Greta Yorsh ?<Greta.Yorsh@arm.com>
>
> ? ? ? ?* gcc.dg/vect/slp-perm-8.c (dg-final): Adjust expected number
> ? ? ? ?of vectorized loops for arm with neon.


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