tree-ssa-dom.c (thread_across_edge): Remove updating here.

* tree-ssa-dom.c (thread_across_edge): Remove updating here.
	(thread_block): Add it here.
	* update-threading.c: New test.

From-SVN: r102648
This commit is contained in:
Jan Hubicka 2005-08-02 02:12:50 +02:00 committed by Jan Hubicka
parent 4dbdb06186
commit 5e5a504e30
5 changed files with 35 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-08-02 Jan Hubicka <jh@suse.cz>
* tree-ssa-dom.c (thread_across_edge): Remove updating here.
* tree-ssa-threadupdate.c (thread_block): Add it here.
2005-08-01 James E Wilson <wilson@specifix.com>
* config/mips/mips.c (mips_encode_section_info, mips_attribute_table,

View File

@ -1,3 +1,7 @@
2005-08-02 Jan Hubicka <jh@suse.cz>
* update-threading.c: New test.
2005-08-01 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.c-torture/compile/20050801-1.c: New test.

View File

@ -0,0 +1,24 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
typedef struct { unsigned short a; } A;
extern void abort (void);
extern void exit (int);
void foo (unsigned int x)
{
if (x != 0x800 && x != 0x810)
abort ();
}
int
main (int argc, char **argv)
{
int i;
for (i = 0; i < 2; ++i)
foo (((A) { ((!(i >> 4) ? 8 : 64 + (i >> 4)) << 8) + (i << 4) } ).a);
exit (0);
}
/* { dg-final { scan-tree-dump-times ".optimized" 0 "Invalid sum"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */

View File

@ -848,8 +848,6 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e)
{
struct edge_info *edge_info;
update_bb_profile_for_threading (e->dest, EDGE_FREQUENCY (e),
e->count, taken_edge);
if (e->aux)
edge_info = e->aux;
else

View File

@ -724,6 +724,8 @@ thread_block (basic_block bb)
else
{
edge e2 = e->aux;
update_bb_profile_for_threading (e->dest, EDGE_FREQUENCY (e),
e->count, e->aux);
/* If we thread to a loop exit edge, then we will need to
rediscover the loop exit edges. While it may seem that