This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/30905] New: [dataflow] Fails to cross-jump
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Feb 2007 10:03:59 -0000
- Subject: [Bug middle-end/30905] New: [dataflow] Fails to cross-jump
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
static int a[30];
static int b[30];
int gen_int(int);
void kernel ()
{
int i;
i = gen_int (1);
if (i != 0)
{
a[0] = a[0] + (a[0] & 3);
b[0] = b[0] + (b[0] | 3);
}
else
{
a[0] = a[0] + (a[0] & 3);
b[0] = b[0] + (b[0] | 3);
}
if (i != 1)
{
a[1] = a[1] + (a[1] & 3);
b[1] = b[1] + (b[1] | 3);
}
else
{
a[1] = a[1] + (a[1] & 3);
b[1] = b[1] + (b[1] | 3);
}
}
is optimized by mainline to straight line code without compares and jumps at
-O2. dataflow branch retains the comparisons with i and the duplicate
instructions.
--
Summary: [dataflow] Fails to cross-jump
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30905