[LLVMbugs] [Bug 23027] New: [X86][AVX] suboptimal splats of high elements of 256-bit vectors
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 25 16:38:50 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23027
Bug ID: 23027
Summary: [X86][AVX] suboptimal splats of high elements of
256-bit vectors
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: spatel+llvm at rotateright.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
AVX shuffling of 256-bit vectors isn't supported very well in hardware. It
looks like real instructions for this don't show up until AVX2.
But I think we can do better than this by using vpermild + vperm2f128:
define <4 x double> @shuffle_splat_v4f64_3(<4 x double> %v) {
%z = shufflevector <4 x double> %v, <4 x double> undef, <4 x i32> <i32 3, i32
3, i32 3, i32 3>
ret <4 x double> %z
}
$ ./llc -o - -mattr=avx splat256.ll
...
vextractf128 $1, %ymm0, %xmm0
vmovhlps %xmm0, %xmm0, %xmm0 ## xmm0 = xmm0[1,1]
vinsertf128 $1, %xmm0, %ymm0, %ymm0
retq
--
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/20150325/17302147/attachment.html>
More information about the llvm-bugs
mailing list