[llvm-bugs] [Bug 24414] New: [loop vectorizer] disable loop unroll pass to unroll vectorized loop further

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 10 10:14:04 PDT 2015


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

            Bug ID: 24414
           Summary: [loop vectorizer] disable loop unroll pass to unroll
                    vectorized loop further
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: wmi at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

For the testcase 1.c below:
int a[1000], b[1000], c[1000];

void foo(int N) {
  int i;
  for (i = 0; i < N; i++) {
    a[i] = b[i] + c[i];
  }
}

~/workarea/llvm-r243652/build/bin/clang -O2 -S 1.c

The loop in 1.c is vectorized and interleaved in loop vectorization. The
interleave factor is 2. After that loop unroll pass unrolls the vectorized loop
another time, and generates an extra loop prologue which cannot be merged with
the scalar remainder loop generated by loop vectorizer.

Maybe it is better to disable loop unroll pass to unroll vectorized loop
further. If it causes any regression, the component of interleave factor
computation needs to be tuned.

-- 
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/20150810/06fbb8b6/attachment.html>


More information about the llvm-bugs mailing list