Commit 1951f101 by Marc Glisse Committed by Marc Glisse

re PR tree-optimization/57361 (Remove self memory assignment)

2013-06-12  Marc Glisse  <marc.glisse@inria.fr>

	PR tree-optimization/57361
gcc/
	* tree-ssa-dse.c (dse_possible_dead_store_p): Handle self-assignment.

gcc/testsuite/
	* gcc.dg/tree-ssa/pr57361.c: New file.

From-SVN: r200034
parent 8b033a8a
2013-06-12 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/57361
* tree-ssa-dse.c (dse_possible_dead_store_p): Handle self-assignment.
2013-06-12 Sofiane Naci <sofiane.naci@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_combine<mode>): convert to split.
......
2013-06-12 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/57361
* gcc.dg/tree-ssa/pr57361.c: New file.
2013-06-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* gcc.target/arm/unaligned-memcpy-4.c (src, dst): Initialize
......
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-dse1-details" } */
struct A { int x; double y; };
void f (struct A *a) {
*a = *a;
}
/* { dg-final { scan-tree-dump "Deleted dead store" "dse1"} } */
......@@ -84,6 +84,13 @@ dse_possible_dead_store_p (gimple stmt, gimple *use_stmt)
*use_stmt = NULL;
/* Self-assignments are zombies. */
if (operand_equal_p (gimple_assign_rhs1 (stmt), gimple_assign_lhs (stmt), 0))
{
*use_stmt = stmt;
return true;
}
/* Find the first dominated statement that clobbers (part of) the
memory stmt stores to with no intermediate statement that may use
part of the memory stmt stores. That is, find a store that may
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment