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
+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
--- /dev/null
+/* { 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"} } */
*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