diff options
author | Jeff Law <law@redhat.com> | 2013-11-21 12:45:16 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2013-11-21 12:45:16 -0700 |
commit | a6094705724d05fc2286c4541c97b8093b77bf05 (patch) | |
tree | ecd22acba8a1cb9ccadacc18271aa7b140edb5f7 /gcc/tree-ssa-threadedge.c | |
parent | 3c8e8595edb357b7ff80c86c46f79823ed1ecce1 (diff) | |
download | gcc-a6094705724d05fc2286c4541c97b8093b77bf05.zip gcc-a6094705724d05fc2286c4541c97b8093b77bf05.tar.gz gcc-a6094705724d05fc2286c4541c97b8093b77bf05.tar.bz2 |
re PR tree-optimization/59221 (wrong code at -O2 and -O3 on x86_64-linux-gnu)
PR tree-optimization/59221
* tree-ssa-threadedge.c (thread_across_edge): Properly manage
temporary equivalences when threading through joiner blocks.
PR tree-optimization/59221
* gcc.c-torture/execute/pr59221.c: New test.
From-SVN: r205229
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
-rw-r--r-- | gcc/tree-ssa-threadedge.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index 7bb8829..a144875 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -1072,6 +1072,10 @@ thread_across_edge (gimple dummy_cond, /* Look at each successor of E->dest to see if we can thread through it. */ FOR_EACH_EDGE (taken_edge, ei, e->dest->succs) { + /* Push a fresh marker so we can unwind the equivalences created + for each of E->dest's successors. */ + stack->safe_push (NULL_TREE); + /* Avoid threading to any block we have already visited. */ bitmap_clear (visited); bitmap_set_bit (visited, taken_edge->dest->index); @@ -1118,6 +1122,9 @@ thread_across_edge (gimple dummy_cond, { delete_jump_thread_path (path); } + + /* And unwind the equivalence table. */ + remove_temporary_equivalences (stack); } BITMAP_FREE (visited); } |