Quite obvious (just generates dead code) and quite annoys reading
SRA dumps.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Richard.

2012-01-27  Richard Guenther  <rguent...@suse.de>

        * tree-sra.c (sra_modify_assign): Do not transform clobbers.

Index: gcc/tree-sra.c
===================================================================
--- gcc/tree-sra.c      (revision 183616)
+++ gcc/tree-sra.c      (working copy)
@@ -2915,11 +2915,12 @@ sra_modify_assign (gimple *stmt, gimple_
   location_t loc;
   gimple_stmt_iterator orig_gsi = *gsi;
 
-  if (!gimple_assign_single_p (*stmt))
+  if (!gimple_assign_single_p (*stmt)
+      || gimple_clobber_p (*stmt))
     return SRA_AM_NONE;
+
   lhs = gimple_assign_lhs (*stmt);
   rhs = gimple_assign_rhs1 (*stmt);
-
   if (TREE_CODE (rhs) == CONSTRUCTOR)
     return sra_modify_constructor_assign (stmt, gsi);
 

Reply via email to