<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 - [X86] Using _mm512_maskz_set1_epi64 on a 32-bit build causes cannot select intrinsic error"
   href="https://bugs.llvm.org/show_bug.cgi?id=34631">34631</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86] Using _mm512_maskz_set1_epi64  on a 32-bit build causes cannot select intrinsic error
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>Headers
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>craig.topper@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This intrinsic is currently implemented in clang by selecting between two
different builtins, __builtin_ia32_pbroadcastq512_gpr_mask(64-bit) and
__builtin_ia32_pbroadcastq512_mem_mask(32-bit). 

But it seems __builtin_ia32_pbroadcastq512_mem_mask was never implemented in
the X86 backend. So using it just causes an isel error. And worse, on a debug
build it hits an llvm_unreachable trying to expand a 64-bit operand on an
intrinsic.


Test case

#include <x86intrin.h>

__m512i test_mm512_maskz_set1_epi64 (__mmask8 __M, long long __A)
{
    //CHECK-LABEL: @test_mm512_maskz_set1_epi64
    //CHECK: @llvm.x86.avx512.mask.pbroadcast.q.gpr.512
  return _mm512_maskz_set1_epi64 (__M, __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>