https://gcc.gnu.org/g:f605165ee4baf65a46a16692e3aaa13046cbd283
commit r16-1079-gf605165ee4baf65a46a16692e3aaa13046cbd283 Author: Richard Biener <rguent...@suse.de> Date: Tue Jun 3 14:09:22 2025 +0200 tree-optimization/120517 - fix dataref group split math DR_INIT is already measured in bytes, so there's no need to multiply the DR_INIT difference of two DRs by the size of one of the DRs when comparing that difference against MAX_BITSIZE_MODE_ANY_MODE. PR tree-optimization/120517 * tree-vect-data-refs.cc (vect_analyze_data_ref_accesses): Fix math in dataref group split. Diff: --- gcc/tree-vect-data-refs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index f2deb751ed92..1792ee4ea05f 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -3685,7 +3685,7 @@ vect_analyze_data_ref_accesses (vec_info *vinfo, /* For datarefs with big gap, it's better to split them into different groups. .i.e a[0], a[1], a[2], .. a[7], a[100], a[101],..., a[107] */ - if ((unsigned HOST_WIDE_INT)(init_b - init_prev) * tree_to_uhwi (szb) + if ((unsigned HOST_WIDE_INT)(init_b - init_prev) > MAX_BITSIZE_MODE_ANY_MODE / BITS_PER_UNIT) break;