Commit 736c86ad by Diego Novillo Committed by Diego Novillo

re PR tree-optimization/20204 (miscompilation of asm-declared registers)


	PR tree-optimization/20204
	* tree-into-ssa.c (insert_phi_nodes_for): Do not use
	REWRITE_THIS_STMT markers on PHI nodes.
	(rewrite_initialize_block): Likewise.


testsuite/ChangeLog

	PR tree-optimization/20204
	* testsuite/gcc.dg/pr20204.c: New test.

From-SVN: r95547
parent 3bf4da72
2005-02-25 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/20204
* tree-into-ssa.c (insert_phi_nodes_for): Do not use
REWRITE_THIS_STMT markers on PHI nodes.
(rewrite_initialize_block): Likewise.
2005-02-25 Mark Mitchell <mark@codesourcery.com> 2005-02-25 Mark Mitchell <mark@codesourcery.com>
* version.c (version_string): Update to 4.1. * version.c (version_string): Update to 4.1.
......
2005-02-25 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/20204
* testsuite/gcc.dg/pr20204.c: New test.
2005-02-24 Jakub Jelinek <jakub@redhat.com> 2005-02-24 Jakub Jelinek <jakub@redhat.com>
PR target/20196 PR target/20196
......
/* { dg-do run { target i?86-*-* } } */
/* { dg-options "-O2" } */
void *x (void *pdst, const void *psrc, unsigned int pn)
{
register void *return_dst = pdst;
register unsigned char *dst = pdst;
register unsigned const char *src = psrc;
register int n __asm__ ("ebx") = pn;
if (src < dst && dst < src + n)
{
src += n;
dst += n;
while (n--)
*--dst = *--src;
return return_dst;
}
while (n >= 16) n--;
return return_dst;
}
extern void abort ();
extern void exit (int);
char xx[30] = "abc";
int main (void)
{
char yy[30] = "aab";
if (x (xx + 1, xx, 2) != xx + 1 || memcmp (xx, yy, sizeof (yy)) != 0)
abort ();
exit (0);
}
...@@ -591,9 +591,6 @@ insert_phi_nodes_for (tree var, bitmap phi_insertion_points) ...@@ -591,9 +591,6 @@ insert_phi_nodes_for (tree var, bitmap phi_insertion_points)
FOR_EACH_EDGE (e, ei, bb->preds) FOR_EACH_EDGE (e, ei, bb->preds)
add_phi_arg (phi, var, e); add_phi_arg (phi, var, e);
} }
/* Mark this PHI node as interesting for the rename process. */
REWRITE_THIS_STMT (phi) = 1;
} }
} }
...@@ -745,8 +742,7 @@ rewrite_initialize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, ...@@ -745,8 +742,7 @@ rewrite_initialize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi)) for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{ {
tree result = PHI_RESULT (phi); tree result = PHI_RESULT (phi);
if (REWRITE_THIS_STMT (phi)) register_new_def (result, &block_defs_stack);
register_new_def (result, &block_defs_stack);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment