http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50749

--- Comment #7 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2011-10-30 
23:36:27 UTC ---
(In reply to comment #6)
> I wonder whether there might be something in the target code that suggests the
> early optimizers to do that?  I've tried playing with the TARGET_ADDRESS_COST
> hook but it didn't have any effect in this case.

-ftree-dump-all shows that forward propagation on ssa trees makes
those memory accesses into simple array accesses.  You can try
-fno-tree-forwprop and see the effect of that option.
It seems that there are no special knobs to control forwprop from
the target side.
The problem is that SH target can't do those simple array accesses
well at QI/HImode because of the lack of displacement addressing
for those modes.

Reply via email to