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

            Bug ID: 25748
           Summary: LLVM cannot vectorize short reduction loop.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedb...@nondot.org
          Reporter: co...@google.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

LLVM fails to vectoize the following reduction loop. The loop is unrolled
before reaching loop vectorizer, and the SLP vectorizer cannot vectorize it.


int a[32];
int reduce_add() {
  int s = 0;
  for (int i = 0; i < 32; ++i)
    s = s + a[i];
  return s;
}

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

Reply via email to