]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/116081 - typedef vs. non-typedef in vectorization
authorRichard Biener <rguenther@suse.de>
Thu, 25 Jul 2024 06:34:20 +0000 (08:34 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 25 Jul 2024 10:44:57 +0000 (12:44 +0200)
The following addresses a behavioral difference in vector type
analysis for typedef vs. non-typedef.  It doesn't fix the issue
at hand but avoids a spurious difference in the dumps.

PR tree-optimization/116081
* tree-vect-stmts.cc (vect_get_vector_types_for_stmt):
Properly compare types.

gcc/tree-vect-stmts.cc

index d717704f57cc8e84565c063aac425213a03b131b..20cae83e8206eaff61a835a549fce088a093f096 100644 (file)
@@ -14903,7 +14903,7 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
         vector size per vectorization).  */
       scalar_type = vect_get_smallest_scalar_type (stmt_info,
                                                   TREE_TYPE (vectype));
-      if (scalar_type != TREE_TYPE (vectype))
+      if (!types_compatible_p (scalar_type, TREE_TYPE (vectype)))
        {
          if (dump_enabled_p ())
            dump_printf_loc (MSG_NOTE, vect_location,