From: Richard Biener Date: Mon, 5 Jul 2021 10:00:17 +0000 (+0200) Subject: Do not set both LOOP_C_INFINITE and LOOP_C_FINITE on vectorized loop X-Git-Tag: basepoints/gcc-13~6309 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88ada5c051c49a1f03602df747a9e6dae675c68e;p=thirdparty%2Fgcc.git Do not set both LOOP_C_INFINITE and LOOP_C_FINITE on vectorized loop The setting is likely a typo and was meant to affect the scalar version but even there LOOP_C_INFINITE is at most an optimization to the niter analysis. Clearly setting it on the vectorized loop which we just versioned to be _not_ infinite is bogus so the following change removes this. 2021-07-05 Richard Biener * tree-vect-loop-manip.c (vect_loop_versioning): Do not set LOOP_C_INFINITE on the vectorized loop. --- diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 012f48bd4870..2909e8a0fc37 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -3597,8 +3597,6 @@ vect_loop_versioning (loop_vec_info loop_vinfo, niter information which is copied from the original loop. */ gcc_assert (loop_constraint_set_p (loop, LOOP_C_FINITE)); vect_free_loop_info_assumptions (nloop); - /* And set constraint LOOP_C_INFINITE for niter analyzer. */ - loop_constraint_set (loop, LOOP_C_INFINITE); } if (LOCATION_LOCUS (vect_location.get_location_t ()) != UNKNOWN_LOCATION