<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 --- - [InstCombine] @llvm.assume(i1 false) -> unreachable"
   href="http://llvm.org/bugs/show_bug.cgi?id=22705">22705</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[InstCombine] @llvm.assume(i1 false) -> unreachable
          </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>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>listmail@philipreames.com
          </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>If we encounter an @llvm.assume whose condition has been proven false, we can
assume that path is not reachable.  An example where this would be useful would
be the following:

void foo(bool unrelated, int* p) {
  if(unrelated) {
    assume(p != null);
    expensive();
  }
}
void bar() { foo(true, nullptr); }


I'm not quite sure how to implement this in InstCombine given that pass is
supposed to preserve the CFG, but it otherwise seems like the right spot to do
it.  It could also be done in SimplifyCFG, but it'd be nice to have it effect
the iteration inside InstCombine.</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>