This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14705] New: [tree-ssa] more alias analysis needed!?
- 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: 24 Mar 2004 03:44:39 -0000
- Subject: [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!?
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The second "if" statement is not optimized away until CSE.
/* Reduced from reload_combine() in postreload.c. */
struct s {
int c;
struct s *next;
};
int global;
extern void bar (void);
void
foo (struct s *p)
{
for (; p; p = p->next)
{
if (p->c != 0)
continue;
global++;
if (p->c == 0)
bar ();
}
}
To give you sense of where this comes from,
think of the first "if" as !INSN_P and
think of the second one as INSN_P with bar() being single_set_2.
--
Summary: [tree-ssa] more alias analysis needed!?
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: 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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705