This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [SH4] DFmode splits after reload


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]