diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2005-12-08 10:34:26 +0100 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2005-12-08 09:34:26 +0000 |
commit | b2a93c0a5a9119b67977cac08dd6c08571d778b0 (patch) | |
tree | c1a74c28885a4a7c5899a367ba5ce19edfb957be /gcc | |
parent | fa8e24519681444e7252c6ef07a0627099fb0a91 (diff) | |
download | gcc-b2a93c0a5a9119b67977cac08dd6c08571d778b0.zip gcc-b2a93c0a5a9119b67977cac08dd6c08571d778b0.tar.gz gcc-b2a93c0a5a9119b67977cac08dd6c08571d778b0.tar.bz2 |
re PR middle-end/25248 (2.6.15-rc4 arch/powerpc/mm/hash_utils_64.c miscompiled)
PR tree-optimization/25248
* tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Do not use
evolution_of_loop from the failed attempt. Remove handling
of MULT_EXPR.
From-SVN: r108225
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-scalar-evolution.c | 68 |
2 files changed, 11 insertions, 64 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e67b713..83df5d9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-12-08 Zdenek Dvorak <dvorakz@suse.cz> + + PR tree-optimization/25248 + * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Do not use + evolution_of_loop from the failed attempt. Remove handling + of MULT_EXPR. + 2005-12-08 Gabriel Dos Reis <gdr@integrable-solutions.net> * tree.h (DECL_EXTERNAL): Clarify documentation. diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index c35298e..bd15ae9 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -1042,6 +1042,7 @@ follow_ssa_edge_in_rhs (struct loop *loop, tree at_stmt, tree rhs, t_bool res = t_false; tree rhs0, rhs1; tree type_rhs = TREE_TYPE (rhs); + tree evol; /* The RHS is one of the following cases: - an SSA_NAME, @@ -1084,14 +1085,15 @@ follow_ssa_edge_in_rhs (struct loop *loop, tree at_stmt, tree rhs, { /* Match an assignment under the form: "a = b + c". */ + evol = *evolution_of_loop; res = follow_ssa_edge (loop, SSA_NAME_DEF_STMT (rhs0), halting_phi, - evolution_of_loop, limit); + &evol, limit); if (res == t_true) *evolution_of_loop = add_to_evolution (loop->num, - chrec_convert (type_rhs, *evolution_of_loop, at_stmt), + chrec_convert (type_rhs, evol, at_stmt), PLUS_EXPR, rhs1); else if (res == t_false) @@ -1186,68 +1188,6 @@ follow_ssa_edge_in_rhs (struct loop *loop, tree at_stmt, tree rhs, break; - case MULT_EXPR: - /* This case is under the form "opnd0 = rhs0 * rhs1". */ - rhs0 = TREE_OPERAND (rhs, 0); - rhs1 = TREE_OPERAND (rhs, 1); - STRIP_TYPE_NOPS (rhs0); - STRIP_TYPE_NOPS (rhs1); - - if (TREE_CODE (rhs0) == SSA_NAME) - { - if (TREE_CODE (rhs1) == SSA_NAME) - { - /* Match an assignment under the form: - "a = b * c". */ - res = follow_ssa_edge - (loop, SSA_NAME_DEF_STMT (rhs0), halting_phi, - evolution_of_loop, limit); - - if (res == t_true || res == t_dont_know) - *evolution_of_loop = chrec_dont_know; - - else if (res == t_false) - { - res = follow_ssa_edge - (loop, SSA_NAME_DEF_STMT (rhs1), halting_phi, - evolution_of_loop, limit); - - if (res == t_true || res == t_dont_know) - *evolution_of_loop = chrec_dont_know; - } - } - - else - { - /* Match an assignment under the form: - "a = b * ...". */ - res = follow_ssa_edge - (loop, SSA_NAME_DEF_STMT (rhs0), halting_phi, - evolution_of_loop, limit); - if (res == t_true || res == t_dont_know) - *evolution_of_loop = chrec_dont_know; - } - } - - else if (TREE_CODE (rhs1) == SSA_NAME) - { - /* Match an assignment under the form: - "a = ... * c". */ - res = follow_ssa_edge - (loop, SSA_NAME_DEF_STMT (rhs1), halting_phi, - evolution_of_loop, limit); - if (res == t_true || res == t_dont_know) - *evolution_of_loop = chrec_dont_know; - } - - else - /* Otherwise, match an assignment under the form: - "a = ... * ...". */ - /* And there is nothing to do. */ - res = t_false; - - break; - case ASSERT_EXPR: { /* This assignment is of the form: "a_1 = ASSERT_EXPR <a_2, ...>" |