https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89664

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
We're leaving occ_head with stale data.  Patch I am testing:

Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c        (revision 269212)
+++ tree-ssa-math-opts.c        (working copy)
@@ -799,7 +799,7 @@ execute_cse_reciprocals_1 (gimple_stmt_i

   /* If it is more profitable to optimize 1 / x, don't optimize 1 / (x * x). 
*/
   if (sqrt_recip_count > square_recip_count)
-    return;
+    goto out;

   /* Do the expensive part only if we can hope to optimize something.  */
   if (count + square_recip_count >= threshold && count >= 1)
@@ -842,6 +842,7 @@ execute_cse_reciprocals_1 (gimple_stmt_i
        }
     }

+out:
   for (occ = occ_head; occ; )
     occ = free_bb (occ);

Reply via email to