------- Comment #4 from pinskia at gcc dot gnu dot org 2007-04-03 06:33 -------
To reproduce this on the trunk use "#define PAR i*2+1000-i-i" instead for the
complex one.
For PPC, VARIABLE_PAR is actually slower, as it tries to use (long unsigned
int) i * 8 as the index and PPC does not have that as an index mode.
And even the RTL optimizers are able to remove the i*2-i-i as we get:
((int) ((unsigned int) i + 1000) - i)
in final_cleanup so we were able to clean up one -i but not both on the tree
level.
The x86 issue is a target issue and I will report this other issue not saying
i*2+1000-i-i is 1000 as a differnet issue.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Component|middle-end |target
Keywords| |missed-optimization
Summary|Misoptimization of constant |addressing modes are not
|function expressions |selected correcly for x86
| |always
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31263