Go to file
Chandler Carruth 4c57955fe3 [x86] Largely complete the use of PSHUFB in the new vector shuffle
lowering with a small addition to it and adding PSHUFB combining.

There is one obvious place in the new vector shuffle lowering where we
should form PSHUFBs directly: when without them we will unpack a vector
of i8s across two different registers and do a potentially 4-way blend
as i16s only to re-pack them into i8s afterward. This is the crazy
expensive fallback path for i8 shuffles and we can just directly use
pshufb here as it will always be cheaper (the unpack and pack are
two instructions so even a single shuffle between them hits our
three instruction limit for forming PSHUFB).

However, this doesn't generate very good code in many cases, and it
leaves a bunch of common patterns not using PSHUFB. So this patch also
adds support for extracting a shuffle mask from PSHUFB in the X86
lowering code, and uses it to handle PSHUFBs in the recursive shuffle
combining. This allows us to combine through them, combine multiple ones
together, and generally produce sufficiently high quality code.

Extracting the PSHUFB mask is annoyingly complex because it could be
either pre-legalization or post-legalization. At least this doesn't have
to deal with re-materialized constants. =] I've added decode routines to
handle the different patterns that show up at this level and we dispatch
through them as appropriate.

The two primary test cases are updated. For the v16 test case there is
still a lot of room for improvement. Since I was going through it
systematically I left behind a bunch of FIXME lines that I'm hoping to
turn into ALL lines by the end of this.

llvm-svn: 214628
2014-08-02 10:39:15 +00:00
clang libclang/Makefile: Update LINK_COMPONENTS take #3. Sorry for the noise. 2014-08-02 07:24:04 +00:00
clang-tools-extra Changed tool-template to use CommonOptionsParser. 2014-08-02 08:24:10 +00:00
compiler-rt [ASan] Use metadata to pass source-level information from Clang to ASan. 2014-08-02 00:35:50 +00:00
debuginfo-tests relax testcase for LLDB output format compatibility. 2014-03-19 23:06:18 +00:00
libclc relational: Add islessequal(floatN) builtin 2014-08-01 21:50:59 +00:00
libcxx Adding ABI information to linux test results 2014-08-01 06:30:18 +00:00
libcxxabi [unwinder] Tell the assembler that functions are functions so that the linker knows how to link them. 2014-08-01 22:02:21 +00:00
lld [Mips] Replace assembler code by YAML to make the 'interpreter.test' test 2014-08-01 09:47:21 +00:00
lldb Make the swig generation script use the correct python executable. 2014-08-02 07:11:22 +00:00
llvm [x86] Largely complete the use of PSHUFB in the new vector shuffle 2014-08-02 10:39:15 +00:00
openmp CMake: remove duplicated source file from list 2014-06-02 13:09:24 +00:00
polly [Format] Remove blank line in Dependences.h 2014-08-01 08:44:49 +00:00