Commit a093356a by Jan Hubicka Committed by Jan Hubicka

re PR lto/54980 (gimple check: expected gimple_cond(error_mark), have…

re PR lto/54980 (gimple check: expected gimple_cond(error_mark), have gimple_call() in gimple_cond_set_lhs, at gimple.h:2578)


	PR tree-optimize/54980
	* tree-ssa-loop-ivcanon.c (constant_after_peeling): Fix
	obvious typo.
	(loop_edge_to_cancel): Be sure that the edge is from an conditional
	so we can cancel it.

From-SVN: r192809
parent 93100c6b
2012-10-25 Jan Hubicka <jh@suse.cz>
PR tree-optimize/54980
* tree-ssa-loop-ivcanon.c (constant_after_peeling): Fix
obvious typo.
(loop_edge_to_cancel): Be sure that the edge is from an conditional
so we can cancel it.
2012-10-25 Marc Glisse <marc.glisse@inria.fr> 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
PR c++/54427 PR c++/54427
...@@ -160,7 +160,7 @@ constant_after_peeling (tree op, gimple stmt, struct loop *loop) ...@@ -160,7 +160,7 @@ constant_after_peeling (tree op, gimple stmt, struct loop *loop)
/* First make fast look if we see constant array inside. */ /* First make fast look if we see constant array inside. */
while (handled_component_p (base)) while (handled_component_p (base))
base = TREE_OPERAND (base, 0); base = TREE_OPERAND (base, 0);
if ((DECL_P (base) == VAR_DECL if ((DECL_P (base)
&& const_value_known_p (base)) && const_value_known_p (base))
|| CONSTANT_CLASS_P (base)) || CONSTANT_CLASS_P (base))
{ {
...@@ -364,6 +364,10 @@ loop_edge_to_cancel (struct loop *loop) ...@@ -364,6 +364,10 @@ loop_edge_to_cancel (struct loop *loop)
else else
edge_to_cancel = EDGE_SUCC (edge_to_cancel->src, 0); edge_to_cancel = EDGE_SUCC (edge_to_cancel->src, 0);
/* We only can handle conditionals. */
if (!(edge_to_cancel->flags & (EDGE_TRUE_VALUE | EDGE_FALSE_VALUE)))
continue;
/* We should never have conditionals in the loop latch. */ /* We should never have conditionals in the loop latch. */
gcc_assert (edge_to_cancel->dest != loop->header); gcc_assert (edge_to_cancel->dest != loop->header);
......
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