The following fixes a quadraticness in reassoc.

Bootstrap / regtest running on x86_64-unknown-linux-gnu.

Richard.

2019-06-21  Richard Biener  <rguent...@suse.de>

        PR tree-optimization/90930
        * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Set visited
        flag on new stmts to avoid re-processing them.

Index: gcc/tree-ssa-reassoc.c
===================================================================
--- gcc/tree-ssa-reassoc.c      (revision 272384)
+++ gcc/tree-ssa-reassoc.c      (working copy)
@@ -4812,6 +4812,7 @@ rewrite_expr_tree_parallel (gassign *stm
       else
        {
          stmts[i] = build_and_add_sum (TREE_TYPE (last_rhs1), op1, op2, 
opcode);
+         gimple_set_visited (stmts[i], true);
        }
       if (dump_file && (dump_flags & TDF_DETAILS))
        {

Reply via email to