https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113734
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Tamar Christina from comment #6) > The reason for the miscompile popping up is this change from the previous > patch > > diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc > index 109d4ce5192..df3eab2e8d5 100644 > --- a/gcc/tree-vect-data-refs.cc > +++ b/gcc/tree-vect-data-refs.cc > @@ -725,8 +725,7 @@ vect_analyze_early_break_dependences (loop_vec_info > loop_vinfo) > bounded by VF so accesses are within range. We only need to > check the > reads since writes are moved to a safe place where if we get > there we > know they are safe to perform. */ > - if (DR_IS_READ (dr_ref) > - && !ref_within_array_bound (stmt, DR_REF (dr_ref))) > + if (!ref_within_array_bound (stmt, DR_REF (dr_ref))) I think it can even be relaxed to if ((DR_IS_READ (dr_ref) && check_deps)) since for non-peeled the IV exit block will be only executed with a fully enabled vector.