<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 - Missed opportunity for vpadd"
   href="https://bugs.llvm.org/show_bug.cgi?id=42607">42607</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Missed opportunity for vpadd
          </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: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>david.bolvansky@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>typedef unsigned long long v64u64 __attribute__((vector_size(64)));
typedef unsigned __int128 v64u128 __attribute__((vector_size(64)));

v64u64 foo(v64u64 a, v64u128 b) { return a + (v64u64)b; }

-O3 -mavx512vbmi -march=skylake

Clang:
foo:                                    # @foo
        vmovq   xmm1, rcx
        vmovq   xmm2, rdx
        vpunpcklqdq     xmm1, xmm2, xmm1 # xmm1 = xmm2[0],xmm1[0]
        vmovq   xmm2, rsi
        vmovq   xmm3, rdi
        vpunpcklqdq     xmm2, xmm3, xmm2 # xmm2 = xmm3[0],xmm2[0]
        vinserti128     ymm1, ymm2, xmm1, 1
        vmovq   xmm2, r9
        vmovq   xmm3, r8
        vpunpcklqdq     xmm2, xmm3, xmm2 # xmm2 = xmm3[0],xmm2[0]
        vinserti128     ymm2, ymm2, xmmword ptr [rsp + 8], 1
        vinserti64x4    zmm1, zmm1, ymm2, 1
        vpaddq  zmm0, zmm1, zmm0
        ret

GCC:
foo:
        vpaddq  zmm0, zmm0, ZMMWORD PTR [rsp+8]
        ret</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>