Reapply 91184 with fixes and an addition to the testcase to cover the problem
authorBob Wilson <bob.wilson@apple.com>
Tue, 15 Dec 2009 22:00:51 +0000 (22:00 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 15 Dec 2009 22:00:51 +0000 (22:00 +0000)
commit970eaf2520760d9aa30ceb3a8d4a0dde4548784d
tree15ecc9db8502201612a10c36f17e941d72f177b5
parent99ea6898e18ec1496907a90efedf5b21a2040ea0
Reapply 91184 with fixes and an addition to the testcase to cover the problem
found last time.  Instead of trying to modify the IR while iterating over it,
I've change it to keep a list of WeakVH references to dead instructions, and
then delete those instructions later.  I also added some special case code to
detect and handle the situation when both operands of a memcpy intrinsic are
referencing the same alloca.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91459 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll [new file with mode: 0644]