PR/18662, also backported from tree-cleanup-branch.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Mon, 29 Nov 2004 01:15:39 +0000 (01:15 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 29 Nov 2004 01:15:39 +0000 (20:15 -0500)
* tree-ssa-ccp.c (substitute_and_fold): If replaced anything,
always call maybe_clean_eh_stmt and modify_stmt.

Co-Authored-By: Diego Novillo <dnovillo@redhat.com>
From-SVN: r91451

gcc/ChangeLog
gcc/tree-ssa-ccp.c

index 6472431065dac2e59eca992e4e024b73dc0806a3..9b2dba2458cdf94d922bcd5586e7b662d886b2c8 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+           Diego Novillo  <dnovillo@redhat.com>            
+
+       PR/18662, also backported from tree-cleanup-branch.
+       * tree-ssa-ccp.c (substitute_and_fold): If replaced anything,
+       always call maybe_clean_eh_stmt and modify_stmt.
+
 2004-11-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        PR/18664
index 911e57350adaa95c5eeb2f9111d8f520a5bc182c..c530eded8c69680bd6b2e2022af4bdceb37d4057 100644 (file)
@@ -579,16 +579,18 @@ substitute_and_fold (void)
            {
              bool changed = fold_stmt (bsi_stmt_ptr (i));
              stmt = bsi_stmt(i);
+
              /* If we folded a builtin function, we'll likely
                 need to rename VDEFs.  */
              if (replaced_address || changed)
-               {
-                 mark_new_vars_to_rename (stmt, vars_to_rename);
-                 if (maybe_clean_eh_stmt (stmt))
-                   tree_purge_dead_eh_edges (bb);
-               }
-             else
-               modify_stmt (stmt);
+               mark_new_vars_to_rename (stmt, vars_to_rename);
+
+              /* If we cleaned up EH information from the statement,
+                 remove EH edges.  */
+             if (maybe_clean_eh_stmt (stmt))
+               tree_purge_dead_eh_edges (bb);
+
+             modify_stmt (stmt);
            }
 
          if (dump_file && (dump_flags & TDF_DETAILS))