]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix typo in peeling for gap compute of get_group_load_store_type
authorRichard Biener <rguenther@suse.de>
Thu, 14 Nov 2024 12:28:48 +0000 (13:28 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 14 Nov 2024 14:30:42 +0000 (15:30 +0100)
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.

gcc/tree-vect-stmts.cc

index a83a46ea0dd9104a0a37adcaf519bbea71b18ec8..011d66747ec13d35365302c363e62d7997f1e524 100644 (file)
@@ -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