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

            Bug ID: 93616
           Summary: Missed chance to use alias checks to vectorise
                    invariant indirection
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
            Blocks: 53947
  Target Milestone: ---

For:

void
foo (char **dest_ptr, char *src)
{
  for (int i = 0; i < 100; ++i)
    (*dest_ptr)[i] = src[i];
}

we should be able to emit a runtime alias check that [src, src+99]
doesn't overlap *dest_ptr and then vectorise the loop normally.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

Reply via email to