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: unassignedb...@nondot.org
          Reporter: david.bolvan...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to