llvm-6502/lib
Chandler Carruth 1029c7003f [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214628 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-02 10:39:15 +00:00
..
Analysis
AsmParser
Bitcode UseListOrder: Fix blockaddress use-list order 2014-08-01 22:27:19 +00:00
CodeGen [SDAG] Refactor the code which deletes nodes in the DAG combiner to do 2014-08-02 10:02:07 +00:00
DebugInfo
ExecutionEngine [MCJIT] Fix an overly-aggressive check in RuntimeDyldMachOARM. 2014-08-02 03:00:49 +00:00
IR IR: Add Value::reverseUseList() 2014-08-01 23:28:49 +00:00
IRReader
LineEditor
Linker
LTO
MC Add support for StackMap section for ELF/Linux systems 2014-08-01 18:47:09 +00:00
Object
Option
ProfileData InstrProf: Allow multiple functions with the same name 2014-08-01 22:50:07 +00:00
Support Remove some calls to std::move. 2014-08-01 14:31:55 +00:00
TableGen
Target [x86] Largely complete the use of PSHUFB in the new vector shuffle 2014-08-02 10:39:15 +00:00
Transforms [ASan] Use metadata to pass source-level information from Clang to ASan. 2014-08-02 00:35:50 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile