<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [Vectorization] Recognize strided access for vectorization"
   href="http://llvm.org/bugs/show_bug.cgi?id=17673">17673</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Vectorization] Recognize strided access for vectorization
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Loop Optimizer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>renato.golin@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>