llvm-6502/lib/CodeGen/SelectionDAG
Andrea Di Biagio 042bee88f3 [X86] Teach method 'isVectorClearMaskLegal' how to check for legal blend masks.
This patch improves the folding of vector AND nodes into blend operations for
targets that feature SSE4.1. A vector AND node where one of the operands is
a constant build_vector with elements that are either zero or all-ones can be
converted into a blend.

This allows for example to simplify the following code:

define <4 x i32> @test(<4 x i32> %A, <4 x i32> %B) {
  %1 = and <4 x i32> %A, <i32 0, i32 0, i32 0, i32 -1>
  %2 = and <4 x i32> %B, <i32 -1, i32 -1, i32 -1, i32 0>
  %3 = or <4 x i32> %1, %2
  ret <4 x i32> %3
}

Before this patch llc (-mcpu=corei7) generated:
        andps  LCPI1_0(%rip), %xmm0, %xmm0
        andps  LCPI1_1(%rip), %xmm1, %xmm1
        orps   %xmm1, %xmm0, %xmm0
        retq

With this patch we generate a single 'vpblendw'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221343 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-05 13:04:14 +00:00
..
CMakeLists.txt
DAGCombiner.cpp [X86] Teach method 'isVectorClearMaskLegal' how to check for legal blend masks. 2014-11-05 13:04:14 +00:00
FastISel.cpp IR: MDNode => Value: Instruction::getMetadata() 2014-11-01 00:10:31 +00:00
FunctionLoweringInfo.cpp Remove uses of the TargetMachine from FunctionLoweringInfo 2014-10-09 00:57:31 +00:00
InstrEmitter.cpp Remove the uses of getSubtargetImpl from InstrEmitter and remove 2014-10-09 01:35:29 +00:00
InstrEmitter.h Remove the uses of getSubtargetImpl from InstrEmitter and remove 2014-10-09 01:35:29 +00:00
LegalizeDAG.cpp Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
LegalizeFloatTypes.cpp Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
LegalizeIntegerTypes.cpp Whitespace. 2014-10-29 15:23:11 +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 Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
LegalizeTypesGeneric.cpp AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
LegalizeVectorOps.cpp Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
LegalizeVectorTypes.cpp [SelectionDAG] When scalarizing trunc, don't assert for legal operands. 2014-10-30 23:46:50 +00:00
LLVMBuild.txt
Makefile
ResourcePriorityQueue.cpp Remove unused argument to CreateTargetScheduleState and change 2014-10-09 01:59:35 +00:00
ScheduleDAGFast.cpp ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes 2014-10-23 22:31:48 +00:00
ScheduleDAGRRList.cpp ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes 2014-10-23 22:31:48 +00:00
ScheduleDAGSDNodes.cpp ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes 2014-10-23 22:31:48 +00:00
ScheduleDAGSDNodes.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ScheduleDAGVLIW.cpp Remove more calls to getSubtargetImpl from the schedulers and 2014-10-09 06:28:06 +00:00
SDNodeDbgValue.h constify the getters in SDNodeDbgValue. 2014-10-13 20:43:47 +00:00
SelectionDAG.cpp Modernize old-style static asserts. NFC. 2014-10-12 17:56:40 +00:00
SelectionDAGBuilder.cpp IR: MDNode => Value: Instruction::getMetadata() 2014-11-01 00:10:31 +00:00
SelectionDAGBuilder.h Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
SelectionDAGDumper.cpp Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
SelectionDAGISel.cpp Remove uses of the TargetMachine from FunctionLoweringInfo 2014-10-09 00:57:31 +00:00
SelectionDAGPrinter.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
TargetLowering.cpp Whitespace. 2014-10-29 15:23:11 +00:00
TargetSelectionDAGInfo.cpp Have TargetSelectionDAGInfo take a DataLayout initializer rather than 2014-06-06 19:04:48 +00:00