llvm/lib
Andrea Di Biagio 817812f61c [X86] Improve the selection of SSE3/AVX addsub instructions.
This patch teaches the backend how to canonicalize a shuffle vectors
according to the rule:

 - (shuffle (FADD A, B), (FSUB A, B), Mask) ->
       (shuffle (FSUB A, -B), (FADD A, -B), Mask)

Where 'Mask' is:
  <0,5,2,7>            ;; for v4f32 and v4f64 shuffles.
  <0,3>                ;; for v2f64 shuffles.
  <0,9,2,11,4,13,6,15> ;; for v8f32 shuffles.

In general, ISel only knows how to pattern-match a canonical
'fadd + fsub + blendi' dag node sequence into an ADDSUB instruction.

This new rule allows to convert a non-canonical dag sequence into a
canonical one that will be matched by a single ADDSUB at ISel stage.

The idea of converting a non-canonical ADDSUB into a canonical one by
swapping the first two operands of the shuffle, and then negating the
second operand of the FADD and FSUB, was originally proposed by Hal Finkel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211771 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-26 10:45:21 +00:00
..
Analysis This patch removed duplicate code for matching patterns 2014-06-26 08:57:33 +00:00
AsmParser Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
Bitcode Rename loop unrolling and loop vectorizer metadata to have a common prefix. 2014-06-25 15:41:00 +00:00
CodeGen Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
DebugInfo Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
ExecutionEngine [RuntimeDyld] Adds the necessary hooks to MCJIT to be able to debug generated 2014-06-25 00:20:53 +00:00
IR MSVC build fix following r211749 2014-06-26 00:25:41 +00:00
IRReader MSVC build fix following r211749 2014-06-26 00:25:41 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Replace some assert(0)'s with llvm_unreachable. 2014-06-18 05:05:13 +00:00
LTO Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
MC Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
Object Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
Option Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
ProfileData Renaming SwapByteOrder() to getSwappedBytes() 2014-06-14 11:36:01 +00:00
Support Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
TableGen Introduce a string_ostream string builder facilty 2014-06-26 00:00:48 +00:00
Target [X86] Improve the selection of SSE3/AVX addsub instructions. 2014-06-26 10:45:21 +00:00
Transforms This patch removed duplicate code for matching patterns 2014-06-26 08:57:33 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00