]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert no longer needed fix for PR95539
authorRichard Biener <rguenther@suse.de>
Fri, 17 Sep 2021 10:48:09 +0000 (12:48 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 17 Sep 2021 11:50:54 +0000 (13:50 +0200)
The workaround is no longer necessary since we maintain alignment
info on the DR group leader only.

2021-09-17  Richard Biener  <rguenther@suse.de>

* tree-vect-stmts.c (vectorizable_load): Do not frob
stmt_info for SLP.

gcc/tree-vect-stmts.c

index 4e0b2adf1dc2404bc345af30cfeb9c819084894e..ce79d883dbf837e943a7893300f3ce78e33ff9c3 100644 (file)
@@ -8515,17 +8515,6 @@ vectorizable_load (vec_info *vinfo,
   if (!STMT_VINFO_DATA_REF (stmt_info))
     return false;
 
-  /* ???  Alignment analysis for SLP looks at SLP_TREE_SCALAR_STMTS[0]
-     for unpermuted loads but we get passed SLP_TREE_REPRESENTATIVE
-     which can be different when reduction chains were re-ordered.
-     Now that we figured we're a dataref reset stmt_info back to
-     SLP_TREE_SCALAR_STMTS[0].  When we're SLP only things should be
-     refactored in a way to maintain the dr_vec_info pointer for the
-     relevant access explicitely.  */
-  stmt_vec_info orig_stmt_info = stmt_info;
-  if (slp_node)
-    stmt_info = SLP_TREE_SCALAR_STMTS (slp_node)[0];
-
   tree mask = NULL_TREE, mask_vectype = NULL_TREE;
   if (gassign *assign = dyn_cast <gassign *> (stmt_info->stmt))
     {
@@ -8768,7 +8757,7 @@ vectorizable_load (vec_info *vinfo,
        dump_printf_loc (MSG_NOTE, vect_location,
                         "Vectorizing an unaligned access.\n");
 
-      STMT_VINFO_TYPE (orig_stmt_info) = load_vec_info_type;
+      STMT_VINFO_TYPE (stmt_info) = load_vec_info_type;
       vect_model_load_cost (vinfo, stmt_info, ncopies, vf, memory_access_type,
                            &gs_info, slp_node, cost_vec);
       return true;