2016-07-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/81303
* tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
into account prologue and epilogue iterations when raising
min_profitable_iters to sth at least covering one vector iteration.
From-SVN: r250416
+2016-07-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/81303
+ * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
+ into account prologue and epilogue iterations when raising
+ min_profitable_iters to sth at least covering one vector iteration.
+
2017-07-21 Tamar Christina <tamar.christina@arm.com>
* config/arm/arm.c (arm_test_cpu_arch_dat):
" Calculated minimum iters for profitability: %d\n",
min_profitable_iters);
- min_profitable_iters =
- min_profitable_iters < vf ? vf : min_profitable_iters;
+ /* We want the vectorized loop to execute at least once. */
+ if (min_profitable_iters < (vf + peel_iters_prologue + peel_iters_epilogue))
+ min_profitable_iters = vf + peel_iters_prologue + peel_iters_epilogue;
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,