[PATCH v2] vect: Check that vector factor is a compile-time constant
authorMichael Collison <collison@rivosinc.com>
Fri, 10 Mar 2023 07:19:04 +0000 (08:19 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 10 Mar 2023 07:20:31 +0000 (08:20 +0100)
* 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.

gcc/tree-vect-loop-manip.cc

index d88edaf..f60fa50 100644 (file)
@@ -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);
        }