[llvm-bugs] [Bug 31351] New: Lower shuffles using AVX-512 EXPAND* instructions

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 11 04:46:57 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=31351

            Bug ID: 31351
           Summary: Lower shuffles using AVX-512 EXPAND* instructions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: zvi.rackover at intel.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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}:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161211/14143325/attachment.html>


More information about the llvm-bugs mailing list