[Bug optimization/13965] New: [tree-ssa] fold takes into account branch target information at tree level
dann at godzilla dot ics dot uci dot edu
gcc-bugzilla@gcc.gnu.org
Sun Feb 1 21:03:00 GMT 2004
It seems that fold takes into account target branch cost.
ssa-ccp-5.c is a copy testsuite/gcc.dg/tree-ssa/ssa-ccp-5.c
./cc1 -O2 -fdump-tree-optimized ssa-ccp-5.c
the .optimized dump for the second function in the file is:
test55 (x, y)
{
<bb 0>:
return;
}
./cc1 -O2 -fdump-tree-optimized ssa-ccp-5.c -mtune=pentiumpro
test55 (x, y)
{
<bb 0>:
if (x == 5 && y != 0) goto <L0>; else goto <L2>;
<L0>:;
if (x + 22 != 27) goto <L1>; else goto <L2>;
<L1>:;
link_error ();
<L2>:;
<L3>:;
return;
}
Thanks to Andrew Pinski for diagnosing this.
The effect of adding -mtune=pentiumpro to the testcase from PR8361 is:
without -mtune=pentiumpro 97575 assembly lines
with -mtune=pentiumpro 103723 assembly lines
This is probably an issue on the mainline too, but it's harder to show a
testcase there.
--
Summary: [tree-ssa] fold takes into account branch target
information at tree level
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13965
More information about the Gcc-bugs
mailing list