llvm-6502/lib
Chandler Carruth fb1293fd4c [x86] Teach the target shuffle mask extraction to recognize unary forms
of normally binary shuffle instructions like PUNPCKL and MOVLHPS.

This detects cases where a single register is used for both operands
making the shuffle behave in a unary way. We detect this and adjust the
mask to use the unary form which allows the existing DAG combine for
shuffle instructions to actually work at all.

As a consequence, this uncovered a number of obvious bugs in the
existing DAG combine which are fixed. It also now canonicalizes several
shuffles even with the existing lowering. These typically are trying to
match the shuffle to the domain of the input where before we only really
modeled them with the floating point variants. All of the cases which
change to an integer shuffle here have something in the integer domain, so
there are no more or fewer domain crosses here AFAICT. Technically, it
might be better to go from a GPR directly to the floating point domain,
but detecting floating point *outputs* despite integer inputs is a lot
more code and seems unlikely to be worthwhile in practice. If folks are
seeing domain-crossing regressions here though, let me know and I can
hack something up to fix it.

Also as a consequence, a bunch of missed opportunities to form pshufb
now can be formed. Notably, splats of i8s now form pshufb.
Interestingly, this improves the existing splat lowering too. We go from
3 instructions to 1. Yes, we may tie up a register, but it seems very
likely to be worth it, especially if splatting the 0th byte (the
common case) as then we can use a zeroed register as the mask.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214625 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-02 10:27:38 +00:00
..
Analysis Fix ScalarEvolutionExpander when creating a PHI in a block with duplicate predecessors 2014-07-31 19:13:38 +00:00
AsmParser Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
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 DWOHolder takes ownership of the argument constructor, use std::unique_ptr. 2014-07-31 20:26:42 +00:00
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 Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
LineEditor
Linker Include <tuple> to make buildbots happy 2014-06-27 18:38:12 +00:00
LTO Attempt at fixing the windows dll build. 2014-07-30 23:39:30 +00:00
MC Add support for StackMap section for ELF/Linux systems 2014-08-01 18:47:09 +00:00
Object A std::unique_ptr case I missed in the previous patch. 2014-07-31 03:36:00 +00:00
Option Generic: add range-adapter for option parsing. 2014-07-09 13:03:37 +00:00
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 Don't fail tablegen immediately after failing to set a value. 2014-07-31 01:44:00 +00:00
Target [x86] Teach the target shuffle mask extraction to recognize unary forms 2014-08-02 10:27:38 +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