Commit 60fa7862 by Martin Liska Committed by Martin Liska

re PR middle-end/71619 (ICE: in predict_loops, at predict.c:1772 with…

re PR middle-end/71619 (ICE: in predict_loops, at predict.c:1772 with --param=max-predicted-iterations=0)

Fix PR middle-end/71619

	PR middle-end/71619
	* predict.c (predict_loops): Revert the hunk that was removed
	in r237103.
	* gcc.dg/pr71619.c: New test.

From-SVN: r237730
parent a34c0db5
2016-06-23 Martin Liska <mliska@suse.cz>
PR middle-end/71619
* predict.c (predict_loops): Revert the hunk that was removed
in r237103.
2016-06-23 Jakub Sejdak <jakub.sejdak@phoesys.com>
* config.gcc: Add support for arm*-*-phoenix* targets.
......
......@@ -1769,7 +1769,11 @@ predict_loops (void)
else
continue;
gcc_checking_assert (nitercst);
/* If the prediction for number of iterations is zero, do not
predict the exit edges. */
if (nitercst == 0)
continue;
probability = RDIV (REG_BR_PROB_BASE, nitercst);
predict_edge (ex, predictor, probability);
}
......
2016-06-23 Martin Liska <mliska@suse.cz>
* gcc.dg/pr71619.c: New test.
2016-06-23 H.J. Lu <hongjiu.lu@intel.com>
PR target/67400
......
/* PR 71619 */
/* { dg-do compile } */
/* { dg-options "-O --param=max-predicted-iterations=0" } */
void
foo ()
{
int count = -10;
while (count++);
}
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