[Bug tree-optimization/32044] [4.3/4.4 Regression] final value replacement too aggressive for e.g. targets with no native div/mod insns
dsilvers at digital-scurf dot org
gcc-bugzilla@gcc.gnu.org
Wed Dec 10 15:50:00 GMT 2008
------- Comment #51 from dsilvers at digital-scurf dot org 2008-12-10 15:49 -------
I'd like to raise here that bug 38453 which was marked as a duplicate of this
is in fact an example not only of wrong optimisation, but of missed
optimisation as well.
The compiler emits the loop in the bug report *and* then emits the umod call
despite already having the same answer in a register.
If the compiler had only emitted the umod call then at least it wouldn't have
done the work twice.
I think it's critical that there be costs applied to these builtins --
especially for platforms where they are a full function call away rather than
being instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32044
More information about the Gcc-bugs
mailing list