llvm-6502/test/Transforms
Chris Lattner d2fa781169 Implement the first half of PR3290: if there is a store of an
integer to a (transitive) bitcast the alloca and if that integer
has the full size of the alloca, then it clobbers the whole thing.
Handle this by extracting pieces out of the stored integer and 
filing them away in the SROA'd elements.

This triggers fairly frequently because the CFE uses integers to
pass small structs by value and the inliner exposes these.  For 
example, in kimwitu++, I see a bunch of these with i64 stores to
"%struct.std::pair<std::_Rb_tree_const_iterator<kc::impl_abstract_phylum*>,bool>"

In 176.gcc I see a few i32 stores to "%struct..0anon".

In the testcase, this is a difference between compiling test1 to:

_test1:
	subl	$12, %esp
	movl	20(%esp), %eax
	movl	%eax, 4(%esp)
	movl	16(%esp), %eax
	movl	%eax, (%esp)
	movl	(%esp), %eax
	addl	4(%esp), %eax
	addl	$12, %esp
	ret

vs:

_test1:
	movl	8(%esp), %eax
	addl	4(%esp), %eax
	ret

The second half of this will be to handle loads of the same form.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61853 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 08:11:13 +00:00
..
ADCE
ArgumentPromotion
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare
CondProp
ConstantMerge
ConstProp
DeadArgElim
DeadStoreElimination Reimplement the inner loop of DSE. It now uniformly uses getDependence(), 2008-12-06 00:53:22 +00:00
FunctionAttrs When calculating 'nocapture' argument attributes, allow 2009-01-02 11:54:37 +00:00
GlobalDCE Delete unused global aliases with internal linkage. 2009-01-05 20:37:33 +00:00
GlobalOpt Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
GVN fix PR3217: fully cached queries need to be verified against the 2008-12-16 07:10:09 +00:00
GVNPRE
IndVarsSimplify convertToSignExtendedInteger should return opInvalidOp instead of asserting if sematics of float does not allow arithmetics. 2008-11-25 19:00:29 +00:00
Inline
InstCombine make m_ConstantInt(int64_t) safely match ConstantInt's that are larger than i64. 2009-01-05 23:45:50 +00:00
Internalize Teach the internalize pass to also internalize 2009-01-05 21:24:45 +00:00
IPConstantProp
JumpThreading testcase for br undef folding. 2008-12-03 07:48:27 +00:00
LCSSA
LICM
LoopDeletion don't spew tons of stuff to the output. This testcase is *not* for 2008-12-03 06:41:50 +00:00
LoopIndexSplit Rewrite code that 1) filters loops and 2) calculates new loop bounds. 2008-12-04 21:38:42 +00:00
LoopRotate
LoopSimplify
LoopStrengthReduce
LoopUnroll
LoopUnswitch Actually test something. Use PR3170 test case. 2008-12-08 23:44:46 +00:00
LowerInvoke
LowerSetJmp
LowerSwitch
Mem2Reg
MemCpyOpt
MergeFunc
PredicateSimplifier
PruneEH
RaiseAllocations
Reassociate
ScalarRepl Implement the first half of PR3290: if there is a store of an 2009-01-07 08:11:13 +00:00
SCCP
SimplifyCFG Add a helper to remove a branch and DCE the condition, and use it 2008-12-16 20:54:32 +00:00
SimplifyLibCalls Run a post-pass that marks known function declarations by name. 2009-01-04 20:27:34 +00:00
SRETPromotion
StripSymbols
TailCallElim
TailDup