<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Lower shuffles using AVX-512 EXPAND* instructions"
   href="https://llvm.org/bugs/show_bug.cgi?id=31351">31351</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Lower shuffles using AVX-512 EXPAND* instructions
          </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>normal
          </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>zvi.rackover@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>define <8 x float> @expand(<4 x float> %a) {
   %res = shufflevector <4 x float> %a, <4 x float> zeroinitializer, <8 x i32>
<i32 0, i32 5, i32 1, i32 5, i32 2, i32 5, i32 3, i32 5>
   ret <8 x float> %res
}

We currently generate:
  vmovaps .LCPI0_0(%rip), %ymm1   # ymm1 = <0,u,1,u,2,u,3,u>
  vpermps %ymm0, %ymm1, %ymm0
  vxorps  %ymm1, %ymm1, %ymm1
  vblendps        $170, %ymm1, %ymm0, %ymm0 # ymm0 =
ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]

This would be better:
  mov $mask, %eax
  mov $eax, %k1
  expandps %ymm0, %ymm0 {%k1}{z}:</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>