llvm-6502/lib/CodeGen/SelectionDAG
Andrea Di Biagio e54158504f [X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes.
This patch teaches the DAGCombiner how to fold a binary OR between two
shufflevector into a single shuffle vector when possible.

The rules are:
  1. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask1)
  2. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf B, A, Mask2)

The DAGCombiner can take advantage of the fact that OR is commutative and
compute two possible shuffle masks (Mask1 and Mask2) for the resulting
shuffle node.

Before folding a dag according to either rule 1 or 2, DAGCombiner verifies
that the resulting shuffle mask is legal for the target.
DAGCombiner would firstly try to fold according to 1.; If not possible
then it will try to fold according to 2.
If both Mask1 and Mask2 are illegal then we conservatively don't fold
the OR instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203156 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 20:19:52 +00:00
..
CMakeLists.txt llvm/lib: [CMake] Add explicit dependency to intrinsics_gen. 2012-06-24 13:32:01 +00:00
DAGCombiner.cpp [X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes. 2014-03-06 20:19:52 +00:00
FastISel.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
FunctionLoweringInfo.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
InstrEmitter.cpp Make stackmap machineinstrs clobber the scratch regs too. 2014-03-05 07:08:16 +00:00
InstrEmitter.h Revert "Give internal classes hidden visibility." 2013-09-11 18:05:11 +00:00
LegalizeDAG.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
LegalizeFloatTypes.cpp Keep TBAA info when rewriting SelectionDAG loads and stores 2013-10-28 11:17:59 +00:00
LegalizeIntegerTypes.cpp Revert r162101 and replace it with a solution that works for targets where the pointer type is illegal. 2014-01-22 22:34:17 +00:00
LegalizeTypes.cpp [DAG] Refactor vector splitting code in SelectionDAG. No functional change intended. 2013-11-19 21:20:17 +00:00
LegalizeTypes.h [AArch64 NEON] Fix pattern match failed on FP_ROUND from v1f128 to v1f64. 2014-01-26 02:19:35 +00:00
LegalizeTypesGeneric.cpp [C++11] Replace llvm::tie with std::tie. 2014-03-02 13:30:33 +00:00
LegalizeVectorOps.cpp [C++11] Replace llvm::next and llvm::prior with std::next and std::prev. 2014-03-02 12:27:27 +00:00
LegalizeVectorTypes.cpp [C++11] Replace llvm::tie with std::tie. 2014-03-02 13:30:33 +00:00
LLVMBuild.txt
Makefile
ResourcePriorityQueue.cpp [C++11] Replace llvm::next and llvm::prior with std::next and std::prev. 2014-03-02 12:27:27 +00:00
ScheduleDAGFast.cpp Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size. 2013-07-14 04:42:23 +00:00
ScheduleDAGRRList.cpp [C++11] Replace llvm::next and llvm::prior with std::next and std::prev. 2014-03-02 12:27:27 +00:00
ScheduleDAGSDNodes.cpp [C++11] Replace llvm::next and llvm::prior with std::next and std::prev. 2014-03-02 12:27:27 +00:00
ScheduleDAGSDNodes.h Revert "Give internal classes hidden visibility." 2013-09-11 18:05:11 +00:00
ScheduleDAGVLIW.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
SDNodeDbgValue.h [Layering] Move DebugLoc.h into the IR library. The implementation 2014-03-05 10:30:38 +00:00
SelectionDAG.cpp R600: Fix extloads from i8 / i16 to i64. 2014-03-06 17:34:12 +00:00
SelectionDAGBuilder.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
SelectionDAGBuilder.h [Modules] Move CallSite into the IR library where it belogs. It is 2014-03-04 11:01:28 +00:00
SelectionDAGDumper.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
SelectionDAGISel.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
SelectionDAGPrinter.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
TargetLowering.cpp Implement inalloca codegen for x86 with the new inalloca design 2014-01-31 23:50:57 +00:00
TargetSelectionDAGInfo.cpp Rename some member variables from TD to DL. 2014-02-18 15:33:12 +00:00