https://gcc.gnu.org/g:faf594ce210cddcd701c6c37326d54b0f91d50f1

commit r15-5249-gfaf594ce210cddcd701c6c37326d54b0f91d50f1
Author: Richard Biener <rguent...@suse.de>
Date:   Thu Nov 14 13:28:48 2024 +0100

    Fix typo in peeling for gap compute of get_group_load_store_type
    
    When fixing a maybe-uninit diagnostic in r15-1309-ge575b5c56137b1 by
    re-computing remain I failed to add braces, effectively now computing
    garbage.
    
            * tree-vect-stmts.cc (get_group_load_store_type): Add missing
            braces.

Diff:
---
 gcc/tree-vect-stmts.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index a83a46ea0dd9..011d66747ec1 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -2195,7 +2195,7 @@ get_group_load_store_type (vec_info *vinfo, stmt_vec_info 
stmt_info,
              unsigned HOST_WIDE_INT cnunits, cvf, cremain, cpart_size;
              if (!nunits.is_constant (&cnunits)
                  || !LOOP_VINFO_VECT_FACTOR (loop_vinfo).is_constant (&cvf)
-                 || (((cremain = group_size * cvf - gap % cnunits), true)
+                 || (((cremain = (group_size * cvf - gap) % cnunits), true)
                      && ((cpart_size = (1 << ceil_log2 (cremain))) != cnunits)
                      && (cremain + group_size < cpart_size
                          || vector_vector_composition_type

Reply via email to