diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2008-02-07 15:11:26 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2008-02-07 15:11:26 +0100 |
commit | c4ae80d945388a7350ec8cf799f60b30036f7ba9 (patch) | |
tree | caa1218e23262b710b363a0ef1598e5755b4ea94 /gcc | |
parent | 0d566d211a223de3a4745d511d4479b5db97b9be (diff) | |
download | gcc-c4ae80d945388a7350ec8cf799f60b30036f7ba9.zip gcc-c4ae80d945388a7350ec8cf799f60b30036f7ba9.tar.gz gcc-c4ae80d945388a7350ec8cf799f60b30036f7ba9.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-ssa-reassoc.c | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 98b577f..334fabf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +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> PR other/35107 diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 200088d..a4118c9 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -857,6 +857,18 @@ rewrite_expr_tree (tree stmt, unsigned int opindex, oe1->op = temp.op; 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 |