[llvm-bugs] [Bug 43656] New: Regression in loop vectorizer (trunk vs. llvm 9)

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 12 06:57:49 PDT 2019


            Bug ID: 43656
           Summary: Regression in loop vectorizer (trunk vs. llvm 9)
           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

size_t h_dist (const uint8_t *restrict a, const uint8_t *restrict b, int n) {
  size_t r = 0;
  // #pragma clang loop vectorize(enable)
  for (int i = 0; i < n; i++)
    r += __builtin_popcount (a[i] ^ b[i]);

  return r;

This loop is no longer vectorized with Clang trunk -O3 and we have a 20-30%
perf drop here.

The loop is vectorized with Clang <= 9.
remark: vectorized loop (vectorization width: 2, interleaved count: 2)

  for (int i = 0; i < n; i++)


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/20191012/5dbe367e/attachment.html>

More information about the llvm-bugs mailing list