From: Richard Biener Date: Tue, 3 Jun 2025 12:09:22 +0000 (+0200) Subject: tree-optimization/120517 - fix dataref group split math X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f605165ee4baf65a46a16692e3aaa13046cbd283;p=thirdparty%2Fgcc.git 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 --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index f2deb751ed9..1792ee4ea05 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;