When the RTL unroller handles constant iteration loops it bails out
prematurely when heuristics wouldn't apply any unrolling before
checking #pragma unroll.
PR rtl-optimization/118298
* loop-unroll.cc (decide_unroll_constant_iterations): Honor
loop->unroll even if the loop is too big for heuristics.
nunroll = targetm.loop_unroll_adjust (nunroll, loop);
/* Skip big loops. */
- if (nunroll <= 1)
+ if (nunroll <= 1
+ && !(loop->unroll > 1 && loop->unroll < USHRT_MAX))
{
if (dump_file)
fprintf (dump_file, ";; Not considering loop, is too big\n");