[llvm-bugs] [Bug 39420] New: Missed loop vectorization

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 24 10:26:58 PDT 2018


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

            Bug ID: 39420
           Summary: Missed loop vectorization
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: llvm-bugs at lists.llvm.org

We are unable to vectorize:

  for (size_t i = 0; i < nrpt; i++) {
    for (size_t j = 0; j < nsize; j++) {
      a[j] = (float)0.0f;
    }

    for (size_t j = 0; j < nsize; j++) {
      for (size_t k = 0; k < nsize; k++) {
        a[j] += b[j] * c[j][k];
      }
    }
  }

While GCC/ICC has no issues with this code. (-march=haswell)

Code example: https://godbolt.org/z/ooyf1N

-- 
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/20181024/b0a1a844/attachment.html>


More information about the llvm-bugs mailing list