This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [SH4] DFmode splits after reload
On Mon, 2003-12-15 at 21:58, Rakesh Kumar - Software, Noida wrote:
> fmov.s @r1+,fr3 <-- Load 64-bit a[i] in two 32-bit halves
> fmov.s @r1,fr2
> add #-4,r1 <-- Restore the value in r1
>...
> add #4,r1
> fmov.s fr2,@r1 <-- Store a[i] in 32-bit pieces
> fmov.s fr3,@-r1
Thanks, that helps. The two adds come from different insn splits. I
thought they were coming from the same split, and hence I got confused
about where the missing instruction was.
> My idea is to recombine the instructions,
> if possible, as and when splitting takes place. As in this case, at the
> time of DFmode store insn, the splitter could have looked for the previous
> use/definition of r1, hence removing two address arithmetic instructions.
That seems risky. splitting can happen in multiple places, and an
instruction that is split is not necessarily emitted. combine for
instance will try splits, and then sometimes throw the result away.
Try defining a peephole2 pattern to handle this. You need to split it
into nothing, but there should be a way to make that work.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com