1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/Transforms
Chris Lattner c70b0c0ee7 optimize bitcasts from large integers to vector into vector
element insertion from the pieces that feed into the vector.
This handles a pattern that occurs frequently due to code
generated for the x86-64 abi.  We now compile something like
this:

struct S { float A, B, C, D; };
struct S g;
struct S bar() { 
  struct S A = g;
  ++A.A;
  ++A.C;
  return A;
}

into all nice vector operations:

_bar:                                   ## @bar
## BB#0:                                ## %entry
	movq	_g@GOTPCREL(%rip), %rax
	movss	LCPI1_0(%rip), %xmm1
	movss	(%rax), %xmm0
	addss	%xmm1, %xmm0
	pshufd	$16, %xmm0, %xmm0
	movss	4(%rax), %xmm2
	movss	12(%rax), %xmm3
	pshufd	$16, %xmm2, %xmm2
	unpcklps	%xmm2, %xmm0
	addss	8(%rax), %xmm1
	pshufd	$16, %xmm1, %xmm1
	pshufd	$16, %xmm3, %xmm2
	unpcklps	%xmm2, %xmm1
	ret

instead of icky integer operations:

_bar:                                   ## @bar
	movq	_g@GOTPCREL(%rip), %rax
	movss	LCPI1_0(%rip), %xmm1
	movss	(%rax), %xmm0
	addss	%xmm1, %xmm0
	movd	%xmm0, %ecx
	movl	4(%rax), %edx
	movl	12(%rax), %esi
	shlq	$32, %rdx
	addq	%rcx, %rdx
	movd	%rdx, %xmm0
	addss	8(%rax), %xmm1
	movd	%xmm1, %eax
	shlq	$32, %rsi
	addq	%rax, %rsi
	movd	%rsi, %xmm1
	ret

This resolves rdar://8360454

llvm-svn: 112343
2010-08-28 01:20:38 +00:00
..
ABCD
ADCE
ArgumentPromotion Fix rdar://7879828 - crash in CallGraph, a self host issue. 2010-04-20 00:46:50 +00:00
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp
DeadArgElim Preserve debug info attached with call instruction while eliminating dead argument. 2010-04-30 20:23:54 +00:00
DeadStoreElimination add newlines at the end of files. 2010-04-07 22:53:17 +00:00
FunctionAttrs
GlobalDCE
GlobalOpt Use llvm.foo as the intrinsic, rather than llvm.dbg.value. Since the 2010-05-04 20:09:25 +00:00
GVN Remove arm_apcscc from the test files. It is the default and doing this 2010-06-17 15:18:27 +00:00
IndVarSimplify Fix SCEVExpander::visitAddRecExpr so that it remembers the induction variable 2010-07-26 18:28:14 +00:00
Inline Fix PR7272: when inlining through a callsite with byval arguments, 2010-05-31 21:00:26 +00:00
InstCombine optimize bitcasts from large integers to vector into vector 2010-08-28 01:20:38 +00:00
Internalize
IPConstantProp
JumpThreading Use LVI to eliminate conditional branches where we've tested a related condition previously. Update tests for this change. 2010-08-27 17:12:29 +00:00
LCSSA Avoid depending on LCSSA implicitly pulling in LoopSimplify. 2010-07-26 18:00:43 +00:00
LICM
LoopDeletion
LoopIndexSplit Check for side effects before splitting loop. 2010-05-03 18:06:58 +00:00
LoopRotate When rotating loops, put the original header at the bottom of the 2010-08-17 17:39:21 +00:00
LoopSimplify LoopSimplify shouldn't split loop backedges that use indirectbr. PR7867. 2010-08-14 00:43:09 +00:00
LoopStrengthReduce Move x86-specific tests out of test/Transforms/LoopStrengthReduce and 2010-08-05 17:04:15 +00:00
LoopUnroll
LoopUnswitch Remove arm_apcscc from the test files. It is the default and doing this 2010-06-17 15:18:27 +00:00
LowerAtomic Add an atomic lowering pass 2010-08-03 16:19:16 +00:00
LowerInvoke
LowerSetJmp
LowerSwitch
Mem2Reg Copy location info for current function argument from dbg.declare if respective store instruction does not have any location info. 2010-06-04 22:27:30 +00:00
MemCpyOpt Reapply address space patch after fixing an issue in MemCopyOptimizer. 2010-04-04 03:10:48 +00:00
MergeFunc Arrays and vectors with different numbers of elements are not equivalent. 2010-07-16 06:31:12 +00:00
PartialSpecialize Fixed and reactivated a partial specialization test 2010-08-19 12:42:38 +00:00
PruneEH fix some failures my callgraph dump format change broke. 2010-04-23 18:38:40 +00:00
Reassociate
ScalarRepl Fix the second half of PR7437: scalarrepl wasn't preserving 2010-07-08 00:27:05 +00:00
SCCP fix PR7876: If ipsccp decides that a function's address is taken 2010-08-12 22:25:23 +00:00
SimplifyCFG Instead, teach SimplifyCFG to trim non-address-taken blocks from 2010-08-16 14:41:14 +00:00
SimplifyLibCalls Make sure that simplify libcalls does not replace a call with one calling 2010-06-16 19:34:01 +00:00
Sink Add an LLVM IR version of code sinking. This uses the same simple algorithm 2010-05-07 15:40:13 +00:00
SRETPromotion
SSI
StripSymbols DIGlobalVariable can be used to encode debug info for globals that are directly folded into a constant by FE. 2010-08-25 18:52:02 +00:00
TailCallElim Handle the case of a tail recursion in which the tail call is followed 2010-07-13 15:41:41 +00:00
TailDup
ValuePropagation Add a prototype of a new peephole optimizing pass that uses LazyValue info to simplify PHIs and select's. 2010-08-27 23:31:36 +00:00