re PR tree-optimization/89649 (r269458 FAILs g++.dg/pr80481.C, scan-assembler-not...
authorRichard Biener <rguenther@suse.de>
Mon, 11 Mar 2019 11:31:05 +0000 (11:31 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 11 Mar 2019 11:31:05 +0000 (11:31 +0000)
2019-03-11  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89649
* tree-vectorizer.h (vect_loop_versioning): Adjust prototype.
* tree-vect-loop-manip.c (vect_do_peeling): Unset force_vectorize
on the prolog and epilog loops.
(vect_loop_versioning): Return copy of loop.
* tree-vect-loop.c (vect_transform_loop): Unset force_vectorize
on the non-vectorized version of the loop.

From-SVN: r269578

gcc/ChangeLog
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c
gcc/tree-vectorizer.h

index 24194ab823e9f07d5133d0408b8acea757c0dce0..cf2e61d2d1f8ed91b128e69406904eb3ebee310a 100644 (file)
@@ -1,3 +1,13 @@
+2019-03-11  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/89649
+       * tree-vectorizer.h (vect_loop_versioning): Adjust prototype.
+       * tree-vect-loop-manip.c (vect_do_peeling): Unset force_vectorize
+       on the prolog and epilog loops.
+       (vect_loop_versioning): Return copy of loop.
+       * tree-vect-loop.c (vect_transform_loop): Unset force_vectorize
+       on the non-vectorized version of the loop.
+
 2019-03-10  Uroš Bizjak  <ubizjak@gmail.com>
 
        PR target/68924
index 58d1850666f4d8bf5a5e14c9f12af2d5bb5e1124..77d3dac771ebe62b2fe9d135c9e5a6e48468d41b 100644 (file)
@@ -2542,6 +2542,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
                           "slpeel_tree_duplicate_loop_to_edge_cfg failed.\n");
          gcc_unreachable ();
        }
+      prolog->force_vectorize = false;
       slpeel_update_phi_nodes_for_loops (loop_vinfo, prolog, loop, true);
       first_loop = prolog;
       reset_original_copy_tables ();
@@ -2612,6 +2613,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
                           "slpeel_tree_duplicate_loop_to_edge_cfg failed.\n");
          gcc_unreachable ();
        }
+      epilog->force_vectorize = false;
       slpeel_update_phi_nodes_for_loops (loop_vinfo, loop, epilog, false);
 
       /* Scalar version loop may be preferred.  In this case, add guard
@@ -2984,7 +2986,7 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, tree * cond_expr)
    The versioning precondition(s) are placed in *COND_EXPR and
    *COND_EXPR_STMT_LIST.  */
 
-void
+struct loop *
 vect_loop_versioning (loop_vec_info loop_vinfo,
                      unsigned int th, bool check_profitability,
                      poly_uint64 versioning_threshold)
@@ -3154,4 +3156,6 @@ vect_loop_versioning (loop_vec_info loop_vinfo,
                             GSI_SAME_STMT);
     }
   update_ssa (TODO_update_ssa);
+
+  return nloop;
 }
index e088b6f79e8f6645ae8a524e9f844549ccfabd01..bd81193a23605e6e78e38f3e1413154d264d8d2f 100644 (file)
@@ -8201,8 +8201,10 @@ vect_transform_loop (loop_vec_info loop_vinfo)
                                              versioning_threshold);
          check_profitability = false;
        }
-      vect_loop_versioning (loop_vinfo, th, check_profitability,
-                           versioning_threshold);
+      struct loop *sloop
+       = vect_loop_versioning (loop_vinfo, th, check_profitability,
+                               versioning_threshold);
+      sloop->force_vectorize = false;
       check_profitability = false;
     }
 
index 0e056f34b53cf80028cdc43d33c8d90f246fb880..d67c54427cc75d0eafb228a885ab87a2ad8ab190 100644 (file)
@@ -1449,8 +1449,8 @@ extern void vect_set_loop_condition (struct loop *, loop_vec_info,
 extern bool slpeel_can_duplicate_loop_p (const struct loop *, const_edge);
 struct loop *slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *,
                                                     struct loop *, edge);
-extern void vect_loop_versioning (loop_vec_info, unsigned int, bool,
-                                 poly_uint64);
+struct loop *vect_loop_versioning (loop_vec_info, unsigned int, bool,
+                                  poly_uint64);
 extern struct loop *vect_do_peeling (loop_vec_info, tree, tree,
                                     tree *, tree *, tree *, int, bool, bool);
 extern void vect_prepare_for_masked_peels (loop_vec_info);