Commit c4ae80d9 by Uros Bizjak Committed by Uros Bizjak

re PR tree-optimization/35085 (gcc.dg/vect/vect-iv-9.c fails)

	PR tree-optimization/35085
	* tree-ssa-reassoc.c (rewrite_expr_tree): Enable destructive update
	for operand entry oe2 in addition to operand entry oe3 in order to
	expose more opportunities for vectorizer sum reduction.

From-SVN: r132168
parent 0d566d21
2008-02-07 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/35085
* tree-ssa-reassoc.c (rewrite_expr_tree): Enable destructive update
for operand entry oe2 in addition to operand entry oe3 in order to
expose more opportunities for vectorizer sum reduction.
2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR other/35107 PR other/35107
......
...@@ -857,6 +857,18 @@ rewrite_expr_tree (tree stmt, unsigned int opindex, ...@@ -857,6 +857,18 @@ rewrite_expr_tree (tree stmt, unsigned int opindex,
oe1->op = temp.op; oe1->op = temp.op;
oe1->rank= temp.rank; oe1->rank= temp.rank;
} }
else if ((oe1->rank == oe3->rank
&& oe2->rank != oe3->rank)
|| (is_phi_for_stmt (stmt, oe2->op)
&& !is_phi_for_stmt (stmt, oe1->op)
&& !is_phi_for_stmt (stmt, oe3->op)))
{
struct operand_entry temp = *oe2;
oe2->op = oe1->op;
oe2->rank = oe1->rank;
oe1->op = temp.op;
oe1->rank= temp.rank;
}
} }
/* The final recursion case for this function is that you have /* The final recursion case for this function is that you have
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment