+2016-11-10 Pat Haugen <pthaugen@us.ibm.com>
+
+ PR rtl-optimization/78241
+ * loop-unroll.c (unroll_loop_runtime_iterations): Don't adjust 'niter', but
+ emit initial peel copy if niter expr is not reliable.
+
2016-11-10 Segher Boessenkool <segher@kernel.crashing.org>
* dwarf2cfi.c (dump_cfi_row): Add forward declaration.
if (tmp != niter)
emit_move_insn (niter, tmp);
- /* For loops that exit at end, add one to niter to account for first pass
- through loop body before reaching exit test. */
- if (exit_at_end)
+ /* For loops that exit at end and whose number of iterations is reliable,
+ add one to niter to account for first pass through loop body before
+ reaching exit test. */
+ if (exit_at_end && !desc->noloop_assumptions)
{
niter = expand_simple_binop (desc->mode, PLUS,
niter, const1_rtx,
auto_sbitmap wont_exit (max_unroll + 2);
- if (extra_zero_check)
+ if (extra_zero_check || desc->noloop_assumptions)
{
/* Peel the first copy of loop body. Leave the exit test if the number
of iterations is not reliable. Also record the place of the extra zero
+2016-11-10 Pat Haugen <pthaugen@us.ibm.com>
+
+ PR rtl-optimization/78241
+ * gcc.dg/pr78241.c: New test.
+
2016-11-10 Jakub Jelinek <jakub@redhat.com>
* gfortran.dg/openmp-define-3.f90: Expect 201511 instead of