PR tree-optimization/52020
* tree-sra.c (sra_modify_assign): Do not transform clobbers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183633
138bc75d-0d04-0410-961f-
82ee72b054a4
2012-01-27 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/52020
+ * tree-sra.c (sra_modify_assign): Do not transform clobbers.
+
+2012-01-27 Richard Guenther <rguenther@suse.de>
+
* ipa-pure-const.c (check_stmt): Clobbers do not make a
function non-const/pure.
if (!acc)
return SRA_AM_NONE;
+ if (gimple_clobber_p (*stmt))
+ {
+ /* Remove clobbers of fully scalarized variables, otherwise
+ do nothing. */
+ if (acc->grp_covered)
+ {
+ unlink_stmt_vdef (*stmt);
+ gsi_remove (gsi, true);
+ return SRA_AM_REMOVED;
+ }
+ else
+ return SRA_AM_NONE;
+ }
+
loc = gimple_location (*stmt);
if (VEC_length (constructor_elt,
CONSTRUCTOR_ELTS (gimple_assign_rhs1 (*stmt))) > 0)