[Bug tree-optimization/80198] [8/9/10/11 Regression] does not vectorize generic inplace integer operation

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 27 11:49:18 GMT 2021


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org
   Last reconfirmed|2017-03-27 00:00:00         |2021-1-27

--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
So I think when you consider

void __attribute__((noinline)) fun(int * a, int * b, int c)
{
  int i;
  for (i=0; i < 256; i++) {
     a[i] = b[i] | c;
  }
}

we can improve the versioning condition to allow a dependence distance
of zero.  Likewise with

void __attribute__((noipa)) generic(int * a, int * b, int c)
{
  int i;
  a = __builtin_assume_aligned (a, 16);
  b = __builtin_assume_aligned (b, 16);
  for (i=0; i < 256; i++) {
      a[i] = b[i] | c;
  }
}

we fail to realize no versioning check is required - the distance is
either zero or a multiple of 16.

Richard - ISTR you added some alignment considerations to the alias
versioning code, but it doesn't seem to help?


More information about the Gcc-bugs mailing list