This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/19940] New: Missed jump threading opportunity due to |.
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Feb 2005 18:35:15 -0000
- Subject: [Bug tree-optimization/19940] New: Missed jump threading opportunity due to |.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider:
void bar (void);
int global;
void
foo (unsigned char pedwarned, unsigned char warned)
{
unsigned char tem = warned | pedwarned;
if (tem == 0)
{
if (global)
warned = 1;
}
tem = warned | pedwarned;
if (tem != 0)
bar ();
}
Notice that if we get to "warned = 1;", we know we are going to call bar.
However, the tree optimizers do not notice this.
The RTL optimizers do find this optimization opportunity.
Reduced from c-decl.c:duplicate_decls.
--
Summary: Missed jump threading opportunity due to |.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: missed-optimization, TREE
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 19794
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19940