[SH4] DFmode splits after reload

Jim Wilson wilson@specifixinc.com
Tue Dec 16 01:42:00 GMT 2003


Rakesh Kumar - Software, Noida wrote:
> fmov.s @r1,fr2
> add #-4,r1              <-- Here
> fmov.s @r2,fr4
> add #4,r1               <-- Here

The code seems broken in that it isn't setting fr3 before using it.  Why 
did that load get optimized out?  When did it get optimized out?  Was 
the load really unnecessary?

Maybe it is unnecessary because of a loop?.  If so, it seems like a 
bigger problem here in that the a[i] load should have been hoisted up 
out of the inner loop, and the store pushed after the inner loop.

If it was legitimately optimized out, then one could argue that there is 
a problem with optimizing out unnecessary loads/stores.  We should have 
been able to simplify load before it was split.

If it is still a legitimate optimization, and the load was optimized out 
before the postreload pass, then it might be reasonable to do something 
there.  There are already some somewhat similar optimizations done by 
the postreload pass.  See reload_cse_move2add.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list