<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 - [AArch64][GlobalISel] struct passing with fp16 members"
   href="https://bugs.llvm.org/show_bug.cgi?id=36345">36345</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AArch64][GlobalISel] struct passing with fp16 members
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sjoerd.meijer@arm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Compilation of this:

  typedef struct {
    __fp16 array[2];
  } struct2;

  struct2 global_arg0;

  void c_test(struct2 arg0) {
    global_arg0 = arg0;
  }

fails with:

  unimplemented reg-to-reg copy
  UNREACHABLE executed at
/data/llvmdev/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:2573!

when e.g. compiled with:

  -O0 --target=aarch64-arm-none-eabi -march=armv8-a+simd+fp bug.c -S

Looks like GISel is generating a COPY node:

  bb.1.entry:
    liveins: $h0, $h1
        renamable $x8 = IMPLICIT_DEF
        renamable $w9 = COPY killed renamable $h0
        ...

but this is trying to copy from a 16-bit to a 32-bit register (and COPY works
with equal sized source/destination registers?).</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>