[Bug tree-optimization/81118] [8 Regression] ice in remove_redundant_iv_tests

2017-06-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81118

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Richard Biener  ---
Fixed.

[Bug tree-optimization/81118] [8 Regression] ice in remove_redundant_iv_tests

2017-06-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81118

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Mon Jun 19 15:08:02 2017
New Revision: 249374

URL: https://gcc.gnu.org/viewcvs?rev=249374=gcc=rev
Log:
2017-06-19  Richard Biener  

PR middle-end/81118
* tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
estimates if we changed anything.

* gcc.dg/torture/pr81118.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr81118.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-cfgcleanup.c

[Bug tree-optimization/81118] [8 Regression] ice in remove_redundant_iv_tests

2017-06-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81118

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-19
  Component|c   |tree-optimization
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Richard Biener  ---
It's another incarnation of PR81090 (as I said in the patch for that PR the fix
is incomplete).  We again have:

#0  0x010b4112 in remove_redundant_iv_tests (loop=0x769d6108)
at /space/rguenther/src/svn/early-lto-debug/gcc/tree-ssa-loop-ivcanon.c:566
566   edge exit_edge = EDGE_SUCC (bb, 0);
(gdb) l
561  upper bound.  */
562   if (elt->is_exit && loop->any_upper_bound
563   && wi::ltu_p (loop->nb_iterations_upper_bound, elt->bound))
564 {
565   basic_block bb = gimple_bb (elt->stmt);
566   edge exit_edge = EDGE_SUCC (bb, 0);
567   struct tree_niter_desc niter;
568
569   if (!loop_exit_edge_p (loop, exit_edge))
570 exit_edge = EDGE_SUCC (bb, 1);
(gdb) p elt->stmt
$1 = 
(gdb) p gimple_bb (elt->stmt)
$2 = 

and thus loop->bounds is not up-to-date (as I said in the audit trail of
PR81090
the situation in cunroll is quite "interesting").