aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2010-07-21 16:17:11 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2010-07-21 16:17:11 +0200
commit75a75e91fdd362c68e552a9e2bb5c0469e4e70af (patch)
tree23e177b54c091472acd392ed87007fb1e4b2678b /gcc/tree-sra.c
parentd74d8807cc43f9d05e099eca871a590fb458c245 (diff)
downloadgcc-75a75e91fdd362c68e552a9e2bb5c0469e4e70af.zip
gcc-75a75e91fdd362c68e552a9e2bb5c0469e4e70af.tar.gz
gcc-75a75e91fdd362c68e552a9e2bb5c0469e4e70af.tar.bz2
re PR tree-optimization/44900 (The variable of SSE will be broken)
2010-07-21 Martin Jambor <mjambor@suse.cz> PR tree-optimization/44900 * tree-sra.c (load_assign_lhs_subreplacements): Updated comments. (sra_modify_assign): Move gsi to the next statmenent unconditionally. * testsuite/g++.dg/torture/pr44900.C: New test. From-SVN: r162375
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index e4971d2..9fd6d2c 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2416,9 +2416,11 @@ handle_unscalarized_data_in_subtree (struct access *top_racc, tree lhs,
(sub)tree. If that is not possible, refresh the TOP_RACC base aggregate and
load the accesses from it. LEFT_OFFSET is the offset of the left whole
subtree being copied, RIGHT_OFFSET is the same thing for the right subtree.
- GSI is stmt iterator used for statement insertions. *REFRESHED is true iff
- the rhs top aggregate has already been refreshed by contents of its scalar
- reductions and is set to true if this function has to do it. */
+ NEW_GSI is stmt iterator used for statement insertions after the original
+ assignment, OLD_GSI is used to insert statements before the assignment.
+ *REFRESHED keeps the information whether we have needed to refresh
+ replacements of the LHS and from which side of the assignments this takes
+ place. */
static void
load_assign_lhs_subreplacements (struct access *lacc, struct access *top_racc,
@@ -2722,9 +2724,7 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi)
&orig_gsi, gsi, &refreshed, lhs);
if (refreshed != SRA_UDH_RIGHT)
{
- if (*stmt == gsi_stmt (*gsi))
- gsi_next (gsi);
-
+ gsi_next (gsi);
unlink_stmt_vdef (*stmt);
gsi_remove (&orig_gsi, true);
sra_stats.deleted++;