OSDN Git Service

[x86, SSE] AVX1 PR28129 (256-bit all-ones rematerialization)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 13 May 2017 13:42:35 +0000 (13:42 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 13 May 2017 13:42:35 +0000 (13:42 +0000)
commit3c8af5480a208e84dc6ffc24285611c15b51177b
tree71c4352e91de88e0f01a8f41dbd387613c7309eb
parent07ac640d6c9bbcd3c727aab92693e7fff301cd34
[x86, SSE] AVX1 PR28129 (256-bit all-ones rematerialization)

Further perf tests on Jaguar indicate that:

vxorps  %ymm0, %ymm0, %ymm0
vcmpps  $15, %ymm0, %ymm0, %ymm0

is consistently faster (by about 9%) than:

vpcmpeqd  %xmm0, %xmm0, %xmm0
vinsertf128  $1, %xmm0, %ymm0, %ymm0

Testing equivalent code on a SandyBridge (E5-2640) puts it slightly (~3%) faster as well.

Committed on behalf of @dtemirbulatov

Differential Revision: https://reviews.llvm.org/D32416

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302989 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/all-ones-vector.ll
test/CodeGen/X86/avx-basic.ll
test/CodeGen/X86/avx-cvt-3.ll
test/CodeGen/X86/avx-intrinsics-fast-isel.ll
test/CodeGen/X86/pr28129.ll
test/CodeGen/X86/vector-pcmp.ll
test/CodeGen/X86/xop-intrinsics-fast-isel.ll