<html>
    <head>
      <base href="https://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 --- - [AArch64] - i1 zextloads marked as legal; requires workaround in CodeGenPrepare::optimizeLoadExt"
   href="https://llvm.org/bugs/show_bug.cgi?id=25591">25591</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AArch64] - i1 zextloads marked as legal; requires workaround in CodeGenPrepare::optimizeLoadExt
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>Backend: AArch64
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>gberry@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently the AArch64 target returns true for isLoadExtLegal(ZEXTLOAD, i64/i32,
i1).  CodeGenPrepare::optimizeLoadExt() uses isLoadExtLegal() to determine if
the pattern (and (load x) mask) will be selected as a single instruction.  (and
(load x) 1) is not selected as a single instruction for AArch64 however,
despite what isLoadExtLegal says.  There is currently a check (ActiveBits <= 1)
in optimizeLoadExt() to work around this discrepancy.  The right fix may be to
mark these i1 zextloads as Promote in the AArch64 backend.

This issue came up in the development of the following change:
<a href="http://reviews.llvm.org/D14584">http://reviews.llvm.org/D14584</a></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>