[LLVMbugs] [Bug 17673] New: [Vectorization] Recognize strided access for vectorization

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 24 01:04:16 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17673

            Bug ID: 17673
           Summary: [Vectorization] Recognize strided access for
                    vectorization
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: renato.golin at linaro.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Stride Access is not supported in the LLVM vectorizer. In order to recognize
loops like:

for (i..N/3) {
 a[3*i] = b[3*i] + I;
 a[3*i+1] = b[3*i+1] + J;
 a[3*i+2] = b[3*i+2] + K;
}

We can't re-roll the loop, nor we can use sequential access, since I, J and K
might have different values (assuming I, J, K, N constant). Detecting the
stride in this case is essential to be able to use interleaved loads/stores
(such as VLDN/VSTN on ARM).

The case where I==J==K can, sometimes, be rerolled, and on such cases, the
current vectorizer can already deal with the transformed loop, but we might
still want the vectorizer to deal with such cases, when loop re-roller is
disabled or it can't detect specific semantics.

Another case, when "a" is a reduction variable, like:

for (i..N/3) {
 a += b[3*i] + I;
 a += b[3*i+1] + J;
 a += b[3*i+2] + K;
}

Should be dealt with the same way, so we need to make sure that the reduction
logic can also cope with non-unit strides.

Finally, non-unit memory induction should be transformed/mapped into the stride
access above, so that loops such as this:

for (i..N/3) {
 a++ = b++ + I;
 a++ = b++ + J;
 a++ = b++ + K;
}

can also be vectorized.

-- 
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/20131024/720410a2/attachment.html>


More information about the llvm-bugs mailing list