From: Michael Collison Date: Fri, 10 Mar 2023 07:19:04 +0000 (+0100) Subject: [PATCH v2] vect: Check that vector factor is a compile-time constant X-Git-Tag: basepoints/gcc-14~637 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dc73876fc9a0df4c3af2766319402d14d39db33;p=thirdparty%2Fgcc.git [PATCH v2] vect: Check that vector factor is a compile-time constant * tree-vect-loop-manip.cc (vect_do_peeling): Use result of constant_lower_bound instead of vf for the lower bound of the epilog loop trip count. --- diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index d88edafa0185..f60fa50e8f4f 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -2921,7 +2921,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, if (new_var_p) { value_range vr (type, - wi::to_wide (build_int_cst (type, vf)), + wi::to_wide (build_int_cst (type, lowest_vf)), wi::to_wide (TYPE_MAX_VALUE (type))); set_range_info (niters, vr); }