https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109971
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Pan Li <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:bffc52838e393a775e13dc48162669b0f43ebe09 commit r14-1493-gbffc52838e393a775e13dc48162669b0f43ebe09 Author: Ju-Zhe Zhong <juzhe.zh...@rivai.ai> Date: Thu Jun 1 12:36:17 2023 +0800 VECT: Change flow of decrement IV Follow Richi's suggestion, I change current decrement IV flow from: do { remain -= MIN (vf, remain); } while (remain != 0); into: do { old_remain = remain; len = MIN (vf, remain); remain -= vf; } while (old_remain >= vf); to enhance SCEV. Include fixes from kewen. This patch will need to wait for Kewen's test feedback. Testing on X86 is on-going Co-Authored by: Kewen Lin <li...@linux.ibm.com> PR tree-optimization/109971 gcc/ChangeLog: * tree-vect-loop-manip.cc (vect_set_loop_controls_directly): Change decrement IV flow. (vect_set_loop_condition_partial_vectors): Ditto.