aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/StringExtras.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-07-21 01:55:47 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-07-21 01:55:47 +0000
commitb878caa5e2ac6b96a79e011f77f25fdbb6e61ccb (patch)
treea2405fdd9b8e6530109e1723744fdc3cacdabc08 /llvm/lib/Support/StringExtras.cpp
parentfb4920eb2513e3519ba59d197bf7db9a29c7cede (diff)
downloadllvm-b878caa5e2ac6b96a79e011f77f25fdbb6e61ccb.zip
llvm-b878caa5e2ac6b96a79e011f77f25fdbb6e61ccb.tar.gz
llvm-b878caa5e2ac6b96a79e011f77f25fdbb6e61ccb.tar.bz2
Add support for 256-bit versions of VPERMIL instruction. This is a new
instruction introduced in AVX, which can operate on 128 and 256-bit vectors. It considers a 256-bit vector as two independent 128-bit lanes. It can permute any 32 or 64 elements inside a lane, and restricts the second lane to have the same permutation of the first one. With the improved splat support introduced early today, adding codegen for this instruction enable more efficient 256-bit code: Instead of: vextractf128 $0, %ymm0, %xmm0 punpcklbw %xmm0, %xmm0 punpckhbw %xmm0, %xmm0 vinsertf128 $0, %xmm0, %ymm0, %ymm1 vinsertf128 $1, %xmm0, %ymm1, %ymm0 vextractf128 $1, %ymm0, %xmm1 shufps $1, %xmm1, %xmm1 movss %xmm1, 28(%rsp) movss %xmm1, 24(%rsp) movss %xmm1, 20(%rsp) movss %xmm1, 16(%rsp) vextractf128 $0, %ymm0, %xmm0 shufps $1, %xmm0, %xmm0 movss %xmm0, 12(%rsp) movss %xmm0, 8(%rsp) movss %xmm0, 4(%rsp) movss %xmm0, (%rsp) vmovaps (%rsp), %ymm0 We get: vextractf128 $0, %ymm0, %xmm0 punpcklbw %xmm0, %xmm0 punpckhbw %xmm0, %xmm0 vinsertf128 $0, %xmm0, %ymm0, %ymm1 vinsertf128 $1, %xmm0, %ymm1, %ymm0 vpermilps $85, %ymm0, %ymm0 llvm-svn: 135662
Diffstat (limited to 'llvm/lib/Support/StringExtras.cpp')
0 files changed, 0 insertions, 0 deletions