mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
3c8e8595ed
commit
a609470572
|
|
@ -1,3 +1,9 @@
|
||||||
|
2013-11-21 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
PR tree-optimization/59221
|
||||||
|
* tree-ssa-threadedge.c (thread_across_edge): Properly manage
|
||||||
|
temporary equivalences when threading through joiner blocks.
|
||||||
|
|
||||||
2013-11-21 Joseph Myers <joseph@codesourcery.com>
|
2013-11-21 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
PR rtl-optimization/55950
|
PR rtl-optimization/55950
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-11-21 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
PR tree-optimization/59221
|
||||||
|
* gcc.c-torture/execute/pr59221.c: New test.
|
||||||
|
|
||||||
2013-11-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
2013-11-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||||
|
|
||||||
PR libfortran/59227
|
PR libfortran/59227
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
|
||||||
|
int a = 1, b, d;
|
||||||
|
short e;
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
for (; b; b++)
|
||||||
|
;
|
||||||
|
short f = a;
|
||||||
|
int g = 15;
|
||||||
|
e = f ? f : 1 << g;
|
||||||
|
int h = e;
|
||||||
|
d = h == 83647 ? 0 : h;
|
||||||
|
if (d != 1)
|
||||||
|
__builtin_abort ();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -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. */
|
/* Look at each successor of E->dest to see if we can thread through it. */
|
||||||
FOR_EACH_EDGE (taken_edge, ei, e->dest->succs)
|
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. */
|
/* Avoid threading to any block we have already visited. */
|
||||||
bitmap_clear (visited);
|
bitmap_clear (visited);
|
||||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||||
|
|
@ -1118,6 +1122,9 @@ thread_across_edge (gimple dummy_cond,
|
||||||
{
|
{
|
||||||
delete_jump_thread_path (path);
|
delete_jump_thread_path (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* And unwind the equivalence table. */
|
||||||
|
remove_temporary_equivalences (stack);
|
||||||
}
|
}
|
||||||
BITMAP_FREE (visited);
|
BITMAP_FREE (visited);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue