This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/50749] SH Target: Post-increment addressing used only for first memory access
- From: "kkojima at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 30 Oct 2011 23:36:27 +0000
- Subject: [Bug target/50749] SH Target: Post-increment addressing used only for first memory access
- Auto-submitted: auto-generated
- References: <bug-50749-4@http.gcc.gnu.org/bugzilla/>
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.