This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop optimizer issues
Hello,
> > and one more of mine that I have added due to iv analysis :-( I
> > just cannot cope with other rtl simplifiers that hapily "simplify"
> > 2*3*4*x to (((x << 2) * 3) << 1).
>
> Note that fold-const.c contains the folder that does what we need:
> it turns the "x = 2*3*4*x" into "x = x * 24".
>
> > (also I need to do stuff like using distributive law, which definitely
> > is not what other rtl simplifiers want).
> >
> We'll have to handle the distributivity law apart, and do the folding then.
I have already written this (and despite of the code duplication it
causes, I think it is better than to try to patch the thing somehow
from the pieces of other exiting optimizers).
Zdenek