This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/81635] [8 Regression] nvptx SLP test cases regressions


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81635

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> So maybe finally a testcase where that SCEV analysis did sth useful...
> 
> x86_64 testcase should be possible with changing the datatype to double?

Yep.

This fails to vectorize with -O2 -ftree-slp-vectorize:
....
double p[1000] __attribute__((aligned(8)));
double p2[1000] __attribute__((aligned(8)));

void __attribute__((noinline, noclone))
foo ()
{
  double a, b;

  unsigned int i;
  for (i = 0; i < 1000; i += 2)
    {
      a = p[i];
      b = p[i+1];

      p2[i] = a;
      p2[i+1] = b;
    }
}
...

Changing 'i' to type int allows it to be vectorized.

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