llvm-6502/lib/CodeGen/SelectionDAG
Andrea Di Biagio 224ffa2549 [DAGCombiner] Add more rules to fold shuffles.
This patch adds two new rules to the DAGCombiner:
 1.  shuffle (shuffle A, Undef, M0), B, M1 -> shuffle A, B, M2
 2.  shuffle (shuffle A, Undef, M0), A, M1 -> shuffle A, Undef, M2

We only do this if the combined shuffle is legal for the target.

Example:
;;
define <4 x float> @test(<4 x float> %a, <4 x float> %b) {
  %1 = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32><i32 6, i32 0, i32 1, i32 7>
  %2 = shufflevector <4 x float> %1, <4 x float> %b, <4 x i32><i32 1, i32 2, i32 4, i32 5>
  ret <4 x i32> %2
}
;;

(using llc -mcpu=corei7 -march=x86-64)
Before, the x86 backend generated:
  pshufd $120, %xmm0, %xmm0
  shufps $-108, %xmm0, %xmm1
  movaps %xmm1, %xmm0

Now the x86 backend generates:
  movsd %xmm1, %xmm0



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213069 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-15 13:26:28 +00:00
..
CMakeLists.txt
DAGCombiner.cpp [DAGCombiner] Add more rules to fold shuffles. 2014-07-15 13:26:28 +00:00
FastISel.cpp [FastISel] Insert patchpoint instruction before the target generated call instruction. 2014-07-15 02:22:46 +00:00
FunctionLoweringInfo.cpp [Modules] Remove potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:02:50 +00:00
InstrEmitter.cpp This reapplies r207235 with an additional bugfixes caught by the msan 2014-04-25 20:49:25 +00:00
InstrEmitter.h
LegalizeDAG.cpp ARM: Allow __fp16 as a function arg or return type for AArch64 2014-07-11 13:33:46 +00:00
LegalizeFloatTypes.cpp [Modules] Remove potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:02:50 +00:00
LegalizeIntegerTypes.cpp Make it possible for ints/floats to return different values from getBooleanContents() 2014-07-10 10:18:12 +00:00
LegalizeTypes.cpp Make it possible for ints/floats to return different values from getBooleanContents() 2014-07-10 10:18:12 +00:00
LegalizeTypes.h [x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous 2014-07-10 12:32:32 +00:00
LegalizeTypesGeneric.cpp Fix ppcf128 component access on little-endian systems 2014-07-03 15:06:47 +00:00
LegalizeVectorOps.cpp [x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous 2014-07-10 12:32:32 +00:00
LegalizeVectorTypes.cpp [x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous 2014-07-10 12:32:32 +00:00
LLVMBuild.txt
Makefile
ResourcePriorityQueue.cpp Fix 'platform-specific' hyphenations 2014-06-30 18:57:16 +00:00
ScheduleDAGFast.cpp [Modules] Remove potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:02:50 +00:00
ScheduleDAGRRList.cpp fixed typo 2014-07-14 18:21:07 +00:00
ScheduleDAGSDNodes.cpp Convert SelectionDAG::MorphNodeTo to use ArrayRef. 2014-04-27 19:21:16 +00:00
ScheduleDAGSDNodes.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-16 04:21:27 +00:00
ScheduleDAGVLIW.cpp The hazard recognizer only needs a subtarget, not a target machine 2014-06-13 22:38:52 +00:00
SDNodeDbgValue.h This reapplies r207235 with an additional bugfixes caught by the msan 2014-04-25 20:49:25 +00:00
SelectionDAG.cpp [x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous 2014-07-10 12:32:32 +00:00
SelectionDAGBuilder.cpp [FastISel] Make isInTailCallPosition independent of SelectionDAG. 2014-07-11 20:50:47 +00:00
SelectionDAGBuilder.h Fix 'platform-specific' hyphenations 2014-06-30 18:57:16 +00:00
SelectionDAGDumper.cpp [x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous 2014-07-10 12:32:32 +00:00
SelectionDAGISel.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
SelectionDAGPrinter.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
TargetLowering.cpp SelectionDAG: Factor FP_TO_SINT lower code out of DAGLegalizer 2014-07-10 22:40:18 +00:00
TargetSelectionDAGInfo.cpp Have TargetSelectionDAGInfo take a DataLayout initializer rather than 2014-06-06 19:04:48 +00:00