diff options
Diffstat (limited to 'gcc/predict.c')
| -rw-r--r-- | gcc/predict.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 470de8a..d505d9c 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -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); } |
