<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 - SimplifyCFG of empty WinEH cleanup pads doesn't handle lifetime.end correctly"
   href="https://bugs.llvm.org/show_bug.cgi?id=44329">44329</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SimplifyCFG of empty WinEH cleanup pads doesn't handle lifetime.end correctly
          </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>Transformation Utilities
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>andrew.kaylor@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22942" name="attach_22942" title="Reproducer for SSA problem">attachment 22942</a> <a href="attachment.cgi?id=22942&action=edit" title="Reproducer for SSA problem">[details]</a></span>
Reproducer for SSA problem

The SimplifyCFG utility doesn't correctly handle lifetime.end intrinsics when
deleting empty WinEH cleanup pads. There are at least two issues.

1. The lifetime.end intrinsic is simply deleted with the empty cleanup pad.
This leaves a path through the control graph in which a pointer appears to be
alive longer than it should.

2. If the lifetime.end is the only user of a PHI node in the cleanup pad we
will attempt to sink the PHI node into the cleanup pad's successor, which might
not be dominated by the cleanup pad. If the PHI node had non-PHI users outside
the cleanup pad this would be safe, but when the only user of the PHI node is a
lifetime.end marker inside the cleanup pad it causes an SSA violation.

The attached IR file reproduces the second problem. The first problem can be
seen in the existing (as of 12/17/2019) SimplifyCFG/empty-cleanuppad.ll test
(in f9).</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>