llvm-project/llvm/test
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
..
Analysis Add @llvm.assume, lowering, and some basic properties 2014-07-25 21:13:35 +00:00
Assembler verify-uselistorder: Change the default -num-shuffles=5 2014-07-31 18:46:24 +00:00
Bindings [OCaml] Don't truncate constants over 32 bits in Llvm.const_int. 2014-07-22 13:55:20 +00:00
Bitcode UseListOrder: Fix blockaddress use-list order 2014-08-01 22:27:19 +00:00
BugPoint llvm/test/BugPoint/compile-custom.ll: Use explicit %python to invoke a test script, compile-custom.ll.py, for shebang-incapable hosts. 2014-07-11 14:44:10 +00:00
CodeGen [x86] Largely complete the use of PSHUFB in the new vector shuffle 2014-08-02 10:39:15 +00:00
DebugInfo Cleanup this test some more. 2014-08-01 23:01:32 +00:00
ExecutionEngine [MCJIT] Fix the ARM BR24 relocation in RuntimeDyldMachO. 2014-07-30 03:35:05 +00:00
Feature Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
FileCheck Add missing test for r214210. 2014-07-29 22:57:59 +00:00
Instrumentation [ASan] Use metadata to pass source-level information from Clang to ASan. 2014-08-02 00:35:50 +00:00
Integer
JitListener
LTO Change the default input for llvm-nm to be a.out instead of standard input 2014-06-23 20:27:53 +00:00
Linker Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
MC Allow only disassembling of M-class MSR masks that the assembler knows how to assemble back. 2014-08-01 12:42:11 +00:00
Object Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
Other IR: Fold away compares between GV GEPs and GVs 2014-07-04 22:05:26 +00:00
TableGen Revert of r213521. This change introduced a non-hermetic test (depending on a 2014-07-22 02:32:12 +00:00
Transforms Add diagnostics to the vectorizer cost model. 2014-08-02 00:14:03 +00:00
Unit Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming. 2014-07-04 05:11:55 +00:00
Verifier Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
YAMLParser
tools InstrProf: Allow multiple functions with the same name 2014-08-01 22:50:07 +00:00
.clang-format
CMakeLists.txt Rename llvm-uselistorder => verify-uselistorder 2014-07-30 17:11:27 +00:00
Makefile lld test for configure & make 2014-06-06 09:06:25 +00:00
Makefile.tests
TestRunner.sh
lit.cfg Rename llvm-uselistorder => verify-uselistorder 2014-07-30 17:11:27 +00:00
lit.site.cfg.in