https://bugs.llvm.org/show_bug.cgi?id=52461

            Bug ID: 52461
           Summary: Missed pattern to vectorize in Loop Vectorizer
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedb...@nondot.org
          Reporter: david.bolvan...@gmail.com
                CC: llvm-bugs@lists.llvm.org

void foo_32(int *a, unsigned N)
{
  int p = 1;
  for (unsigned i = 0; i < 32; i++, p*=2)
    a[i] *= p; // SLP Vectorizer catches this.
}

void foo_N(int *a, unsigned N)
{
  int p = 1;
  for (unsigned i = 0; i < N; i++, p*=2)
    a[i] *= p; // Loop Vectorizer fails to vectorize this code.
}


https://godbolt.org/z/qasEo3cd9

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to