llvm-6502/test
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
..
Analysis Don't try to analyze this "backward" case. This is overly conservative 2009-01-02 18:54:17 +00:00
Archive
Assembler Don't spew bitcode to standard out if this test 2009-01-05 10:52:29 +00:00
Bindings/Ocaml
Bitcode
BugPoint
CodeGen The coalescer does not coalesce a virtual register to a physical register if any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away: 2009-01-07 02:08:57 +00:00
DebugInfo This test passes again, unXFAIL. 2009-01-05 09:30:47 +00:00
ExecutionEngine
Feature
FrontendAda
FrontendC Strength test. 2009-01-05 21:27:59 +00:00
FrontendC++
FrontendFortran
FrontendObjC
FrontendObjC++
Integer alignment of 0 is not valid. 2009-01-05 08:14:35 +00:00
lib
Linker
LLVMC
Other
Scripts
TableGen
Transforms Implement the first half of PR3290: if there is a store of an 2009-01-07 08:11:13 +00:00
Verifier
Makefile
Makefile.tests
TestRunner.sh