[Bug tree-optimization/84515] missed optimization: expected loop merging
rsandifo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 22 19:31:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84515
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu.org
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
count==1 might be the difficult case, since it's the only situation in which
the second loop does something but the first loop doesn't. But the code for:
void f2(unsigned count) {
unsigned i;
if (count <= 1) {
g += count;
} else {
for (i = 0; i < count/2; i++) g++;
for ( ; i < count ; i++) g++;
}
}
is also poor.
More information about the Gcc-bugs
mailing list