<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][AVX512] Strange uitofp v2i64 to v2f32 legalization"
   href="https://bugs.llvm.org/show_bug.cgi?id=39205">39205</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86][AVX512] Strange uitofp v2i64 to v2f32 legalization
          </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>Windows NT
          </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>llvm-dev@redking.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, zvi.rackover@intel.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre><a href="https://gcc.godbolt.org/z/-HRm6i">https://gcc.godbolt.org/z/-HRm6i</a>

Why 3 vcvtusi2ssq entries?

llc -matrr=+avx512f

define <4 x float> @uitofp_2i64_2f32(<2 x i64> %a) {
  %cvt = uitofp <2 x i64> %a to <2 x float>
  %ext = shufflevector <2 x float> %cvt, <2 x float> undef, <4 x i32> <i32 0,
i32 1, i32 undef, i32 undef>
  ret <4 x float> %ext
}

define <4 x float> @uitofp_2i64_4f32(<2 x i64> %a) {
  %ext = shufflevector <2 x i64> %a, <2 x i64> undef, <4 x i32> <i32 0, i32 1,
i32 undef, i32 undef>
  %cvt = uitofp <4 x i64> %ext to <4 x float>
  ret <4 x float> %cvt
}

uitofp_2i64_2f32: # @uitofp_2i64_2f32
  vpextrq $1, %xmm0, %rax
  vcvtusi2ssq %rax, %xmm1, %xmm1
  vmovq %xmm0, %rax
  vcvtusi2ssq %rax, %xmm2, %xmm0
  vinsertps $16, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
  vcvtusi2ssq %rax, %xmm2, %xmm1
  vshufps $4, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0,1],xmm1[0,0]
  retq

uitofp_2i64_4f32: # @uitofp_2i64_4f32
  vpextrq $1, %xmm0, %rax
  vcvtusi2ssq %rax, %xmm1, %xmm1
  vmovq %xmm0, %rax
  vcvtusi2ssq %rax, %xmm2, %xmm0
  vinsertps $16, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
  vcvtusi2ssq %rax, %xmm2, %xmm1
  vshufps $4, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0,1],xmm1[0,0]
  retq</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>