[PATCH] Optimize x*x*x*x*x*x using 3 multiplications.
Gabriel Dos Reis
gdr@integrable-solutions.net
Tue Jul 29 17:31:00 GMT 2003
Roger Sayle <roger@eyesopen.com> writes:
Just to make sure I understand what you're acheiving.
| One piece of ugliness is that we now have to disable the constant folding
| transformation of pow(x,2) into x*x.
People have been recently suggesting to forward calls to pow() in the
hope that it would, for example, expand pow(x, 2) into x * x. What
are the reasons for nto doing that?
| Clearly, if GCC's constant folding
| transforms both ways calling fold on the result, we'll end up with
| unbounded recursion.
Clearly.
-- Gaby
More information about the Gcc-patches
mailing list