This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/77282] [7 regression] test case gcc.dg/autopar/pr46193.c fails starting with r239414
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Aug 2016 09:44:36 +0000
- Subject: [Bug tree-optimization/77282] [7 regression] test case gcc.dg/autopar/pr46193.c fails starting with r239414
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-77282-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77282
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, so autopar is limited by the same issues as vectorization (loop carried
dependences via non-reduction PHIs) and thus should enable the PRE code that
inhibits such transforms. Would the testcase have vectorization enabled it
would "work".
Index: gcc/tree-ssa-pre.c
===================================================================
--- gcc/tree-ssa-pre.c (revision 239560)
+++ gcc/tree-ssa-pre.c (working copy)
@@ -4270,7 +4275,7 @@ eliminate_dom_walker::before_dom_childre
if (sprime
&& TREE_CODE (sprime) == SSA_NAME
&& do_pre
- && flag_tree_loop_vectorize
+ && (flag_tree_loop_vectorize || flag_tree_parallelize_loops)
&& loop_outer (b->loop_father)
&& has_zero_uses (sprime)
&& bitmap_bit_p (inserted_exprs, SSA_NAME_VERSION (sprime))
fixes this.