]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/120517 - fix dataref group split math
authorRichard Biener <rguenther@suse.de>
Tue, 3 Jun 2025 12:09:22 +0000 (14:09 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 3 Jun 2025 13:24:47 +0000 (15:24 +0200)
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.

gcc/tree-vect-data-refs.cc

index f2deb751ed921536e330164483ba0fcc174796f1..1792ee4ea05f125406ec70fbf5114d4024a02b83 100644 (file)
@@ -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;