------- Comment #7 from sebpop at gmail dot com 2010-03-01 18:21 ------- Subject: Re: [4.5 Regression] ICE in try_improve_iv_set, at tree-ssa-loop-ivopts.c:5238
> You should fuse this condition into the previous condition expression > to avoid the inner if. Like this: diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 74dadf7..3b766ed 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -4121,7 +4121,8 @@ determine_use_iv_cost_condition (struct ivopts_data *data, TODO: The constant that we're substracting from the cost should be target-dependent. This information should be added to the target costs for each backend. */ - if (integer_zerop (*bound_cst) + if (!infinite_cost_p (elim_cost) + && integer_zerop (*bound_cst) && (operand_equal_p (*control_var, cand->var_after, 0) || operand_equal_p (*control_var, cand->var_before, 0))) elim_cost.cost -= 1; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43209