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
+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.
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
--- /dev/null
+/* PR 71619 */
+
+/* { dg-do compile } */
+/* { dg-options "-O --param=max-predicted-iterations=0" } */
+
+void
+foo ()
+{
+ int count = -10;
+ while (count++);
+}