[Bug tree-optimization/70614] [4.9/5/6 Regression] GCC gets stuck with -O

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 14 09:44:00 GMT 2016


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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
We already have --param scev-max-expr-complexity (and --param
scev-max-expr-size)
for this.

But I have a simple fix for the testcase.

Index: tree-scalar-evolution.c
===================================================================
--- tree-scalar-evolution.c     (revision 234970)
+++ tree-scalar-evolution.c     (working copy)
@@ -1687,6 +1690,8 @@ interpret_condition_phi (struct loop *lo
        (loop, PHI_ARG_DEF (condition_phi, i));

       res = chrec_merge (res, branch_chrec);
+      if (res == chrec_dont_know)
+       break;
     }

   return res;

Improves the testcase to compile in 0.5s.


More information about the Gcc-bugs mailing list