[x86] Make the v8i16 clever single-input shuffle lowering usable for
authorChandler Carruth <chandlerc@gmail.com>
Fri, 27 Feb 2015 11:33:46 +0000 (11:33 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 27 Feb 2015 11:33:46 +0000 (11:33 +0000)
commit8c71e440a23fc6ae98a3c30eafe000ea37fd2112
tree5dccb9fe05a8795873188967c431b8208be6fc6e
parentf5651f8ab67421585fc7caaa04e4fe6ef80fd2c8
[x86] Make the v8i16 clever single-input shuffle lowering usable for
repeated 128-bit lane shuffles of wider vector types and use it to lower
256-bit v16i16 vector shuffles where applicable.

This should let us perfectly lowering the pattern of pshuflw and pshufhw
even for AVX2 256-bit patterns.

I've not added AVX-512 support, but it should be trivial for someone
working on that to wire up.

Note that currently this generates bad, long shuffle chains because we
don't combine 256-bit target shuffles. The subsequent patches will fix
that.

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