]> git.ipfire.org Git - thirdparty/gcc.git/commit
VECT: Change flow of decrement IV
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Thu, 1 Jun 2023 04:36:17 +0000 (12:36 +0800)
committerPan Li <pan2.li@intel.com>
Fri, 2 Jun 2023 11:49:54 +0000 (19:49 +0800)
commitbffc52838e393a775e13dc48162669b0f43ebe09
treebd5815bfa42f1b13c4bb97fba5a2fb76233b2cbe
parent7bf89a919fdab9e18b7ad3efaa1a79f1d7520ddf
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  <linkw@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.
gcc/tree-vect-loop-manip.cc