]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Handle mixing REALPART/IMAGPART with other components in SLP groups
authorRichard Biener <rguenther@suse.de>
Mon, 2 Sep 2024 13:12:58 +0000 (15:12 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 3 Sep 2024 06:36:33 +0000 (08:36 +0200)
The following makes sure we handle a SLP load/store group from
a structure with complex and scalar members.  This for example
happens in gcc.target/i386/pr106010-9a.c.

* tree-vect-slp.cc (vect_build_slp_tree_1): Handle mixing
all of handled components besides ARRAY_RANGE_REF, drop
handling of INDIRECT_REF.

gcc/tree-vect-slp.cc

index 5a65a99d61ed9600d7793a68899f4d6089c35ad8..2302d91fd23f84886f39f43166db0f9aba2af967 100644 (file)
@@ -1318,13 +1318,15 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
               && !(STMT_VINFO_GROUPED_ACCESS (stmt_info)
                    && (first_stmt_code == ARRAY_REF
                        || first_stmt_code == BIT_FIELD_REF
-                       || first_stmt_code == INDIRECT_REF
                        || first_stmt_code == COMPONENT_REF
+                       || first_stmt_code == REALPART_EXPR
+                       || first_stmt_code == IMAGPART_EXPR
                        || first_stmt_code == MEM_REF)
                    && (rhs_code == ARRAY_REF
                        || rhs_code == BIT_FIELD_REF
-                       || rhs_code == INDIRECT_REF
                        || rhs_code == COMPONENT_REF
+                       || rhs_code == REALPART_EXPR
+                       || rhs_code == IMAGPART_EXPR
                        || rhs_code == MEM_REF)))
              || (ldst_p
                  && (STMT_VINFO_GROUPED_ACCESS (stmt_info)