[Patch (preapproved)] Guard Copy Header pass on
authorJames Greenhalgh <james.greenhalgh@arm.com>
Thu, 27 Jul 2017 11:42:17 +0000 (11:42 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Thu, 27 Jul 2017 11:42:17 +0000 (11:42 +0000)
While answering a user question on the equivalence of
-ftree-loop-vectorize + -ftree-slp-vectorize and -ftree-vectorize I
spotted one case which broke the equivalence. pass_ch::process_loop_p
was guarded on flag_tree_vectorize, meaning you would get it for
-ftree-vectorize, but not for -ftree-loop-vectorize/-ftree-slp-vectorize.

This patch fixes that, getting rid of the only use of flag_tree_vectorize
in the code base.

gcc/

* tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
flag_tree_loop_vectorize rather than flag_tree_vectorize.

From-SVN: r250619

gcc/ChangeLog
gcc/tree-ssa-loop-ch.c

index ae549e7ed0d4f89ae5224bc6d3a774e89113be4f..845dd756d5363f93c8ffd70ddd2e2f6cff1cc613 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
+       flag_tree_loop_vectorize rather than flag_tree_vectorize.
+
 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        PR target/81534
index 86be34a1ac7159ae234bf9f6ffcbc87158983c7c..14cc6d8d72149f6d1d6ae177faa2ce1b47c1547f 100644 (file)
@@ -436,7 +436,7 @@ pass_ch::process_loop_p (struct loop *loop)
 bool
 pass_ch_vect::process_loop_p (struct loop *loop)
 {
-  if (!flag_tree_vectorize && !loop->force_vectorize)
+  if (!flag_tree_loop_vectorize && !loop->force_vectorize)
     return false;
 
   if (loop->dont_vectorize)