------- Comment #10 from bonzini at gnu dot org 2007-03-07 08:22 -------
Unfortunately, if I fix the fwprop bug (which is actually caused by wrong df
information), I get again
leal -4(%edi), %eax
movl %eax, %edi
movl (%eax), %eax
testl %eax, %eax
The df bug is fixed by:
Index: ../../base-gcc-src/gcc/df-scan.c
===================================================================
--- ../../base-gcc-src/gcc/df-scan.c (revision 122624)
+++ ../../base-gcc-src/gcc/df-scan.c (working copy)
@@ -1833,6 +1833,13 @@ df_record_entry_block_defs (struct dataf
#endif
}
+ /* Mark all global registers as being defined at the entry of the
+ function since values set by our caller should not be treated as
+ uninitialized. */
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ if (global_regs[i])
+ bitmap_set_bit (df->entry_block_defs, i);
+
/* Once the prologue has been generated, all of these registers
should just show up in the first regular block. */
if (HAVE_prologue && epilogue_completed)
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21596