llvm-6502/lib
Andrea Di Biagio 8887371782 [X86] Teach the backend how to lower vector shift left into multiply rather than scalarizing it.
Instead of expanding a packed shift into a sequence of scalar shifts,
the backend now tries (when possible) to convert the vector shift into a
vector multiply.

Before this change, a shift of a MVT::v8i16 vector by a
build_vector of constants was always scalarized into a long sequence of "vector
extracts + scalar shifts + vector insert".
With this change, if there is SSE2 support, we emit a single vector multiply.

This change also affects SSE4.1, AVX, AVX2 shifts:
 - A shift of a MVT::v4i32 vector by a build_vector of non uniform constants
is now lowered when possible into a single SSE4.1 vector multiply.
 - Packed v16i16 shift left by constant build_vector are now expanded when
possible into a single AVX2 vpmullw.
This change also improves the lowering of AVX512f vector shifts.

Added test CodeGen/X86/vec_shift6.ll with some code examples that are affected
by this change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201271 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-12 23:42:28 +00:00
..
Analysis SCEV: Cast switched values to make -Wswitch more useful. 2014-02-11 19:02:55 +00:00
AsmParser [ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret' 2014-01-31 17:41:22 +00:00
Bitcode Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
CodeGen Reformat a few lines with clang-format. 2014-02-12 22:47:09 +00:00
DebugInfo make llvm-dwarfdump a little more resilient when parsing .debug_loc 2014-02-11 21:22:53 +00:00
ExecutionEngine Extend RTDyld API to enable optionally precomputing the total amount of memory 2014-02-12 21:30:07 +00:00
IR Mark the methods in the Mangler const. 2014-02-10 21:25:13 +00:00
IRReader Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
LineEditor Avoid using EL_GETFP. 2014-02-04 20:04:46 +00:00
Linker Add a -suppress-warnings option to bitcode linking. 2014-02-06 18:01:56 +00:00
LTO LTO API: add lto_module_create_from_memory_with_path. 2014-02-10 23:26:14 +00:00
MC Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call 2014-02-12 15:39:20 +00:00
Object Change the begin and end methods in ObjectFile to match the style guide. 2014-02-10 20:24:04 +00:00
Option Avoid buffer copies when a Twine already is a StringRef. 2013-12-03 18:18:28 +00:00
Support Rename Windows.h to WindowsSupport.h to avoid ambiguity 2014-02-12 21:26:20 +00:00
TableGen [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
Target [X86] Teach the backend how to lower vector shift left into multiply rather than scalarizing it. 2014-02-12 23:42:28 +00:00
Transforms InstCombine: Teach icmp merging about the equivalence of bit tests and UGE/ULT with a power of 2. 2014-02-11 21:09:03 +00:00
CMakeLists.txt Introduce line editor library. 2014-01-31 23:46:14 +00:00
LLVMBuild.txt Introduce line editor library. 2014-01-31 23:46:14 +00:00
Makefile Introduce line editor library. 2014-01-31 23:46:14 +00:00