<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 - Assert failure in getFunctionLocalOffsetAfterInsn on Hexagon"
   href="https://bugs.llvm.org/show_bug.cgi?id=44001">44001</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assert failure in getFunctionLocalOffsetAfterInsn on Hexagon
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>llc
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>thomas.preudhomme@celest.fr
          </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=22812" name="attach_22812" title="Code generating a call in bundle at -O3 on Hexagon">attachment 22812</a> <a href="attachment.cgi?id=22812&action=edit" title="Code generating a call in bundle at -O3 on Hexagon">[details]</a></span>
Code generating a call in bundle at -O3 on Hexagon

I'm hitting an assert failure in getFunctionLocalOffsetAfterInsn on our
out-of-tree target when a call is in a bundle which can be reproduced on
Hexagon with the attached testcase when compiling with -O3.

This is due to EmitFunctionBody browsing MI without entering into bundles and
thus label being inserted after bundles with call instructions while
constructCallSiteEntryDIEs() browse all MIs. When calling
getFunctionLocalOffsetAfterInsn() with the call MI no label can be found after
it and the assert fails.

This does not hit ARM target which also uses bundles and allows call in them
because bundles are unpacked before this code is executed and thus labels are
inserted after the call MI.</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>