This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/57300] [4.8/4.9 Regression] statement in expression miscompiled at -O3 in 32-bit mode
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 May 2013 09:01:45 +0000
- Subject: [Bug rtl-optimization/57300] [4.8/4.9 Regression] statement in expression miscompiled at -O3 in 32-bit mode
- Auto-submitted: auto-generated
- References: <bug-57300-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57300
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Apparently split* passes aren't the only passes that split insns though, so the
patch I've attached is incomplete anyway.
>From quick skimming, it seems split*, dbr, final, combine and pro_and_epilogue
passes split insns right now, and some backends (but not i386/s390 that are
problematic here). split* passes don't run df_analyze at all, so I think it is
safe to call df_note_add_problem (); df_analyze (); there, final/dbr don't have
cfg around, so it is unsafe, combine already has note problem computed, and
pro_and_epilogue only splits eh_return pattern.
So supposedly
bool
split_dead_or_set_p (rtx insn, const_rtx x)
{
if (BLOCK_FOR_INSN (insn) == NULL)
return false; /* If cfg is gone, be conservative. */
if (df_note == NULL)
{
df_note_add_problem ();
df_analyze ();
}
return dead_or_set_p (insn, x);
}
could work. Steven, comments?