<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 - "Simplify the CFG" pass moves musttail call from tail position"
   href="https://bugs.llvm.org/show_bug.cgi?id=35774">35774</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"Simplify the CFG" pass moves musttail call from tail position
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.0
          </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>Transformation Utilities
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>benzrf@gmail.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=19611" name="attach_19611" title="Files mentioned in the description">attachment 19611</a> <a href="attachment.cgi?id=19611&action=edit" title="Files mentioned in the description">[details]</a></span>
Files mentioned in the description

The attached file `musttail.ll` branches before making a call. The callee is
the same in both branches, but it is a non-tail call in one branch and a
`musttail` call in the other. The optimizer mistakenly merges the two calls
into a single one before the branch, resulting in incorrect output. Running
`clang -O1 -S -emit-llvm musttail.ll -o musttail_O1.ll` produces an attached
malformed file which is rejected by `llc` for containing a `musttail` call in
non-tail position. I have also attached the output of `opt -O1 -S
-print-after-all musttail.ll`.</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>