]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fixup wrong change to get_group_load_store_type
authorRichard Biener <rguenther@suse.de>
Thu, 31 Jul 2025 12:56:27 +0000 (14:56 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 31 Jul 2025 14:07:16 +0000 (16:07 +0200)
The following fixes up the r16-2593-g6ac78317aa6adf change which
made us match up a scalar with a vector type.  Oops.

Noticed when removing the gather/scatter pattern that creates the
IFNs early.

* tree-vect-stmts.cc (get_group_load_store_type): Properly
compare the scalar type of the gather/scatter offset to
the offset vector component type.

gcc/tree-vect-stmts.cc

index 7fe9996b48ce5ab94eb3bb51a56ff0c13b8214a1..3fa4585160c849dac19e1084ab00db67cbce634c 100644 (file)
@@ -2007,7 +2007,7 @@ get_group_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
       if (GATHER_SCATTER_IFN_P (*gs_info)
          && !is_gimple_call (stmt_info->stmt)
          && !tree_nop_conversion_p (TREE_TYPE (gs_info->offset),
-                                    offset_vectype))
+                                    TREE_TYPE (offset_vectype)))
        {
          if (dump_enabled_p ())
            dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,