fix CTOR vectorization
authorRichard Biener <rguenther@suse.de>
Fri, 20 Mar 2020 14:00:11 +0000 (15:00 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 20 Mar 2020 14:02:32 +0000 (15:02 +0100)
We failed to handle pattern stmts appropriately.

2020-03-20  Richard Biener  <rguenther@suse.de>

* tree-vect-slp.c (vect_analyze_slp_instance): Push the stmts
to vectorize for CTOR defs.

gcc/ChangeLog
gcc/tree-vect-slp.c

index ab8d421c822f95ccb41fcf49c677a8f2de9f242a..362345516b8d19529db57f0c863cb5f7835ce958 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-20  Richard Biener  <rguenther@suse.de>
+
+       * tree-vect-slp.c (vect_analyze_slp_instance): Push the stmts
+       to vectorize for CTOR defs.
+
 2020-03-20  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
             Andre Vieira  <andre.simoesdiasvieira@arm.com>
             Mihail Ionescu  <mihail.ionescu@arm.com>
index 9d17e3386fa1d5e9f30fab67a4ad54b60eb92dbd..fb13af7965eb3ee0a3b2401d2f42b806b4221929 100644 (file)
@@ -2257,6 +2257,7 @@ vect_analyze_slp_instance (vec_info *vinfo,
              /* Value is defined in another basic block.  */
              if (!def_info)
                return false;
+             def_info = vect_stmt_to_vectorize (def_info);
              scalar_stmts.safe_push (def_info);
            }
          else