<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 - GlobalISel unimplemented reg-to-reg copy assertion"
   href="https://bugs.llvm.org/show_bug.cgi?id=40798">40798</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GlobalISel unimplemented reg-to-reg copy assertion
          </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>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>Backend: AArch64
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sam.parker@arm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>arnaud.degrandmaison@arm.com, llvm-bugs@lists.llvm.org, peter.smith@linaro.org, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21500" name="attach_21500" title="reproducer at -O0">attachment 21500</a> <a href="attachment.cgi?id=21500&action=edit" title="reproducer at -O0">[details]</a></span>
reproducer at -O0

Running llc at -O0 with the attached .ll file results in an assertion in
llvm::AArch64InstrInfo::copyPhysReg. I don't know anything about GlobalISel but
from  the debug output, I think the offending instructions are these:
  %20:_(<4 x s32>) = G_EXTRACT %19:_(s384), 0                                   
  %21:_(<4 x s32>) = G_EXTRACT %19:_(s384), 128                                 
  %22:_(<4 x s32>) = G_EXTRACT %19:_(s384), 256

Which get legalised into:
  %20:fpr(<4 x s32>) = G_BUILD_VECTOR %189:gpr(s64), %191:gpr(s64)
  %21:fpr(<4 x s32>) = G_BUILD_VECTOR %179:gpr(s64), %181:gpr(s64)              
  %22:fpr(<4 x s32>) = G_BUILD_VECTOR %169:gpr(s64), %171:gpr(s64)

Which I believe is incorrect because of the type mismatch between the scalars
and the elements of the resulting vector.</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>