[llvm-bugs] [Bug 47726] New: [SLP] Missing vectorization of a reduction loop

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 5 01:05:45 PDT 2020


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

            Bug ID: 47726
           Summary: [SLP] Missing vectorization of a reduction loop
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: llvm-bugs at lists.llvm.org

int foo(int d[64], int r) {
  for (unsigned i = 0; i < 64; ++i) r -= d[i];
  return r;
}

https://godbolt.org/z/GYqdrh

Loop is vectorized with -fno-unroll-loops.

Also no problems with:

int foo(int d[64], int n, int r) {
  for (unsigned i = 0; i < n; ++i) r -= d[i];
  return r;
}

-- 
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/20201005/ce37f611/attachment.html>


More information about the llvm-bugs mailing list