<html>
    <head>
      <base href="https://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 --- - [AliasSetTracker] Should ignore intrinsics that don't actually affect memory"
   href="https://llvm.org/bugs/show_bug.cgi?id=30807">30807</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AliasSetTracker] Should ignore intrinsics that don't actually affect memory
          </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>Windows NT
          </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>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mcrosier@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dberlin@dberlin.org, gberry@codeaurora.org, hfinkel@anl.gov, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In r285191, a patch was committed to allow AST to ignoring assume,
lifetime_[start|end], and invariant[start|end] intrinsics.  Unfortunately, this
caused one of the asan tests (i.e., use-after-scope-loop-bug.cc) to begin
failing on all the bots.

The test is as follows:
int main() {
  // Variable goes in and out of scope.
  for (int i = 0; i < 3; ++i) {
    int x[3] = {i, i, i};
    p = x + i;
  }
  return *p;  // BOOM
}

After r285191, LICM is able to sink the stores to x[] after the loop body. 
This appears to be reasonable behavior, but LICM (and likely other code motion
passes) will need to either 1) remove the lifetime markers from things you
hoist/sink or 2) extend the lifetime markers accordingly with the latter
solution being strongly preferred.  The algorithm for that is that when you
eliminate or sink things past them, you move the end to wherever the lowest
point you sunk to is.  You move starts to a block that post-dominates both the
new end and the old end.

r285191 was reverted in r285227 to return the bots to green.</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>