<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 --- - Port bitfield optimisations from AArch64 to ARM64"
   href="http://llvm.org/bugs/show_bug.cgi?id=19424">19424</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Port bitfield optimisations from AArch64 to ARM64
          </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>All
          </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>Backend: AArch64
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>t.p.northover@gmail.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>ARM64 doesn't currently form enough (any?) BFI instructions, which means it
cannot pass test/CodeGen/bitfield-insert.ll.

AArch64 gets this via a DAG combine (search for "tryCombineToBFI"). However,
there's a wrinkle: transplanting the code directly results in failures in
ARM64's rev.ll test because the early formation of ARM64ISD::BFI nodes
interferes with the normal DAG combines.

However, the AArch64 code relies on (at least) two passes of DAG combine to
reach its optimal form. This is a flaw which means we can't simply disable it
during early combines.

So, the options are:
  + Rewrite it to be recursive and build the final BFI in just one pass.
  + Rewrite it as some C++ ISelDAG code (similarly recursive).

I *suspect* that the second option will give better results, and not be
significantly harder than the first.</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>