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.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

        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 | 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 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;
 
-- 
2.43.0

Reply via email to