[Bug middle-end/30905] New: [dataflow] Fails to cross-jump
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Feb 21 10:04:00 GMT 2007
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
More information about the Gcc-bugs
mailing list