diff mbox

[match-and-simplify] Fix remaining testsuite ICEs

Message ID alpine.LSU.2.11.1408061156270.20733@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Aug. 6, 2014, 9:56 a.m. UTC
On Wed, 6 Aug 2014, Richard Biener wrote:

> 
> The following fixes the remaining ICEs I see when testing all
> languages (but ada and go).
> 
> The tree-cfg.c hunk highlights one change in the behavior
> of fold_stmt, namely that it now follows SSA edges by default.
> Maybe that's undesired?  On a related note, fold_stmt_inplace
> preserves the actual statement object gsi_stmt points to,
> but in reality callers use it to avoid creating new SSA names
> thus would it be ok if fold_stmt_inplace made sure to
> preserve the number of statements (and only change what
> gsi points to) only?
> 
> Bootstrapped / tested on x86_64-unknown-linux-gnu, applied.

The following clarifies the comment.

Richard.

2014-08-06  Richard Biener  <rguenther@suse.de>

	* tree-cfg.c (replace_uses_by): Clarify added comment.
diff mbox

Patch

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c	(revision 213655)
+++ gcc/tree-cfg.c	(working copy)
@@ -1748,11 +1748,12 @@  replace_uses_by (tree name, tree val)
 	  /* If we have sth like
 	       neighbor_29 = <name> + -1;
 	       _33 = <name> + neighbor_29;
-	     and end up visiting _33 first then folding will
-	     simplify the stmt to _33 = <name>; and the new
-	     immediate use will be inserted before the stmt
-	     iterator marker and thus we fail to visit it
-	     again, ICEing within the has_zero_uses assert.
+	     and substitute 1 for <name> then when visiting
+	     _33 first then folding will simplify the stmt
+	     to _33 = <name>; and the new immediate use will
+	     be inserted before the stmt iterator marker and
+	     thus we fail to visit it again, ICEing within the
+	     has_zero_uses assert.
 	     Avoid that by never following SSA edges.  */
 	  if (fold_stmt (&gsi, no_follow_ssa_edges))
 	    stmt = gsi_stmt (gsi);