Commit c6542175 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/53070 (ICE: in execute_cse_reciprocals, at…

re PR tree-optimization/53070 (ICE: in execute_cse_reciprocals, at tree-ssa-math-opts.c:513 with -O -ffast-math -ftree-loop-if-convert -fno-tree-loop-im)

2012-04-23  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/53070
	* tree-if-conv.c (combine_blocks): Free predicates in all blocks.
	(main_tree_if_conversion): Verify we succeeded in that.

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

From-SVN: r186704
parent 9771644a
2012-04-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53070
* tree-if-conv.c (combine_blocks): Free predicates in all blocks.
(main_tree_if_conversion): Verify we succeeded in that.
2012-04-23 Jan Hubicka <jh@suse.cz> 2012-04-23 Jan Hubicka <jh@suse.cz>
* lto-symtab.c (lto_cgraph_replace_node): Do not call * lto-symtab.c (lto_cgraph_replace_node): Do not call
......
2012-04-23 Richard Guenther <rguenther@suse.de> 2012-04-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53070
* gcc.dg/torture/pr53070.c: New testcase.
2012-04-23 Richard Guenther <rguenther@suse.de>
PR c/53060 PR c/53060
* gcc.dg/pr53060.c: New testcase. * gcc.dg/pr53060.c: New testcase.
......
/* { dg-do compile } */
/* { dg-options "-ffast-math -ftree-loop-if-convert -fno-tree-loop-im" } */
int
foo (int c)
{
int t = 0, i = 0;
for (; i < 100; i++)
t += c ? c : 1;
return t;
}
...@@ -1651,8 +1651,8 @@ combine_blocks (struct loop *loop) ...@@ -1651,8 +1651,8 @@ combine_blocks (struct loop *loop)
free_bb_predicate (bb); free_bb_predicate (bb);
if (bb_with_exit_edge_p (loop, bb)) if (bb_with_exit_edge_p (loop, bb))
{ {
gcc_assert (exit_bb == NULL);
exit_bb = bb; exit_bb = bb;
break;
} }
} }
gcc_assert (exit_bb != loop->latch); gcc_assert (exit_bb != loop->latch);
...@@ -1779,6 +1779,7 @@ main_tree_if_conversion (void) ...@@ -1779,6 +1779,7 @@ main_tree_if_conversion (void)
struct loop *loop; struct loop *loop;
bool changed = false; bool changed = false;
unsigned todo = 0; unsigned todo = 0;
basic_block bb;
if (number_of_loops () <= 1) if (number_of_loops () <= 1)
return 0; return 0;
...@@ -1794,6 +1795,11 @@ main_tree_if_conversion (void) ...@@ -1794,6 +1795,11 @@ main_tree_if_conversion (void)
free_dominance_info (CDI_POST_DOMINATORS); free_dominance_info (CDI_POST_DOMINATORS);
#ifdef ENABLE_CHECKING
FOR_EACH_BB (bb)
gcc_assert (!bb->aux);
#endif
return todo; return todo;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment