<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - [Polly - AST Generation] Use != for upper loop bound"
   href="https://bugs.llvm.org/show_bug.cgi?id=32997">32997</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Polly - AST Generation] Use != for upper loop bound
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Polly
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>isl
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>polly-dev@googlegroups.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tobias@grosser.es
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently the isl AST generator derives

for (long i = LB; i <= UB; i++)
  A[i]

for most loops. An alternative would be to generate

for (long i = LB; i != UB + 1; i++)
  A[i]

In the second version a value of LB that is strictly larger than UB + 1 will
cause i to eventually overflow. As we know this is not valid (and we annotate i
in Polly with NSW), the IR carries the information that such an overflow can
never happen
and consequently that LB must be smaller or equal to UB + 1.

LLVM and its -indvars pass prefers the second alternative precisely for this
reason.

We should consider to generate IR with the above type.</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>