llvm-6502/lib/CodeGen/SelectionDAG
Chris Lattner e6f7c267df Change handling of illegal vector types to widen when possible instead of
expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats.  This
affects two places in the code: handling cross block values and handling
function return and arguments.  Since vectors are already widened by 
legalizetypes, this gives us much better code and unblocks x86-64 abi
and SPU abi work.

For example, this (which is a silly example of a cross-block value):
define <4 x float> @test2(<4 x float> %A) nounwind {
 %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
 %C = fadd <2 x float> %B, %B
  br label %BB
BB:
 %D = fadd <2 x float> %C, %C
 %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
 ret <4 x float> %E
}

Now compiles into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 addps %xmm0, %xmm0
 ret

previously it compiled into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 pshufd $1, %xmm0, %xmm1
                                        ## kill: XMM0<def> XMM0<kill> XMM0<def>
 insertps $0, %xmm0, %xmm0
 insertps $16, %xmm1, %xmm0
 addps %xmm0, %xmm0
 ret

This implements rdar://8230384



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112101 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 22:49:25 +00:00
..
CMakeLists.txt Move CallingConvLower.cpp out of the SelectionDAG directory. 2010-07-07 15:15:27 +00:00
DAGCombiner.cpp Fix a crash in the dag combiner caused by ConstantFoldBIT_CONVERTofBUILD_VECTOR calling itself 2010-07-27 18:02:18 +00:00
FastISel.cpp Fix typo. 2010-08-17 01:30:33 +00:00
FunctionLoweringInfo.cpp It's better to have the arrays, which would trigger the creation of stack 2010-07-27 01:55:19 +00:00
InstrEmitter.cpp Emit COPY instructions instead of using copyRegToReg in InstrEmitter, 2010-07-10 19:08:25 +00:00
InstrEmitter.h Don't set kill flags for instructions which the scheduler has cloned. 2010-05-14 22:01:14 +00:00
LegalizeDAG.cpp Fix some GCC warnings by providing a virtual destructor in the base of a class 2010-08-23 08:25:07 +00:00
LegalizeFloatTypes.cpp Convert some tab stops into spaces. 2010-07-12 08:16:59 +00:00
LegalizeIntegerTypes.cpp 80-col. 2010-07-23 01:05:59 +00:00
LegalizeTypes.cpp Use A.append(...) instead of A.insert(A.end(), ...) when A is a 2010-06-21 19:47:52 +00:00
LegalizeTypes.h tidy up, reduce indentation 2010-08-24 22:43:11 +00:00
LegalizeTypesGeneric.cpp Fix va_arg for doubles. With this patch VAARG nodes always contain the 2010-07-11 04:01:49 +00:00
LegalizeVectorOps.cpp Change UpdateNodeOperands' operand and return value from SDValue to 2010-06-18 15:30:29 +00:00
LegalizeVectorTypes.cpp tidy up, reduce indentation 2010-08-24 22:43:11 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
ScheduleDAGFast.cpp Make fast scheduler handle asm clobbers correctly. 2010-08-17 22:17:24 +00:00
ScheduleDAGList.cpp Trim #include. 2010-05-26 00:55:59 +00:00
ScheduleDAGRRList.cpp The "excess register pressure" returned by HighRegPressure() is not accurate enough to factor into scheduling priority. Eliminate it and add early exits to speed up scheduling. 2010-07-26 21:49:07 +00:00
ScheduleDAGSDNodes.cpp Add missing null check reported by Amaury Pouly. 2010-08-10 02:39:45 +00:00
ScheduleDAGSDNodes.h Code refactoring, no functionality changes. 2010-06-10 02:09:31 +00:00
SDNodeDbgValue.h Add const qualifiers to CodeGen's use of LLVM IR constructs. 2010-04-15 01:51:59 +00:00
SDNodeOrdering.h Allow 0 as an order number. Don't assign an order to formal arguments. 2009-12-22 21:35:02 +00:00
SelectionDAG.cpp Prefix next' iterator operation with llvm::'. 2010-08-02 06:00:15 +00:00
SelectionDAGBuilder.cpp Change handling of illegal vector types to widen when possible instead of 2010-08-25 22:49:25 +00:00
SelectionDAGBuilder.h Fix comment. 2010-08-25 20:41:24 +00:00
SelectionDAGISel.cpp Reapply r110396, with fixes to appease the Linux buildbot gods. 2010-08-06 18:33:48 +00:00
SelectionDAGPrinter.cpp Eliminate unnecessary empty string literals. 2010-08-04 01:39:08 +00:00
TargetLowering.cpp Change handling of illegal vector types to widen when possible instead of 2010-08-25 22:49:25 +00:00
TargetSelectionDAGInfo.cpp Implement a bunch more TargetSelectionDAGInfo infrastructure. 2010-05-11 17:31:57 +00:00