[llvm-bugs] [Bug 25748] New: LLVM cannot vectorize short reduction loop.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 4 15:08:25 PST 2015


            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: unassignedbugs at nondot.org
          Reporter: congh at google.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151204/c6a20bd5/attachment.html>

More information about the llvm-bugs mailing list