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

            Bug ID: 109271
           Summary: Unnecessary vectorization alias versioning check
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

Split out from PR80198

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;
  }
}

is versioned for aliasing by the vectorizer, not realizing the alignment
guarantees allow vectorizing with 16byte vectors without.  Actually
the CCP pass after the vectorizer is able to elide the check, so this
but is merely to track the cost side of this (also when mixed with
a more complex required versioning check it might fail to optimize later).

Reply via email to