OSDN Git Service

[X86][SSE] Avoid vector byte shuffles with zero by using pshufb to create zeros
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 9 Jan 2015 22:03:19 +0000 (22:03 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 9 Jan 2015 22:03:19 +0000 (22:03 +0000)
commit34630b6ea9744c95a6feef73814728e60853d27e
tree9d79252a9f8c6e89b23926c85f816cfaa6aaa076
parent2ca895612c9b4404beb2eafdb47b3997abd036bf
[X86][SSE] Avoid vector byte shuffles with zero by using pshufb to create zeros

pshufb can shuffle in zero bytes as well as bytes from a source vector - we can use this to avoid having to shuffle 2 vectors and ORing the result when the used inputs from a vector are all zeroable.

Differential Revision: http://reviews.llvm.org/D6878

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225551 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-shuffle-128-v16.ll