<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 --- - [DependenceAnalysis] collectUpperBound triggers asserts"
   href="http://llvm.org/bugs/show_bug.cgi?id=21585">21585</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[DependenceAnalysis] collectUpperBound triggers asserts
          </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>All
          </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>Global Analyses
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>wujingyue@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, sebpop@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13354" name="attach_13354" title="the test that triggers assertion failures">attachment 13354</a> <a href="attachment.cgi?id=13354&action=edit" title="the test that triggers assertion failures">[details]</a></span>
the test that triggers assertion failures

collectUpperBound assumes the type of the back edge count is no wider than the
desired type (T). However, this assumption does not hold at least in
strongSIVTest where the type of Delta may be narrower. 

In the attached test case, the back edge count is i64 100, but the Delta
(derived from i32 %i and i32 5) is of i32. 

define void @i32_subscript(i32* %a) {
entry:
  br label %for.body

for.body:
  %i = phi i32 [ 0, %entry ], [ %i.inc, %for.body ]
  %a.addr = getelementptr i32* %a, i32 %i
  %a.addr.2 = getelementptr i32* %a, i32 5
  %0 = load i32* %a.addr, align 4
  %1 = add i32 %0, 1
  store i32 %1, i32* %a.addr.2, align 4
  %i.inc = add nsw i32 %i, 1
  %i.inc.ext = sext i32 %i to i64
  %exitcond = icmp ne i64 %i.inc.ext, 100
  br i1 %exitcond, label %for.body, label %for.end

for.end:
  ret void
}

Note: this issue is similar to PR18082 in that both are caused by sort of type
mismatching. However, the type mismatch in PR18082 is caused by
removeMatchingExtensions, and this bug is not. 

Jingyue</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>