This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[SH4] DFmode splits after reload
- From: "Rakesh Kumar - Software, Noida" <rakeshku at noida dot hcltech dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 12 Dec 2003 14:16:12 +0530
- Subject: [SH4] DFmode splits after reload
Hi All,
The instruction
a[i] += a[j]; /* a is a double array */
when compiled for SH4 (-O2 -ml -m4) generates the following assembly.
fmov.s @r2+,fr5
fmov.s @r1,fr2
add #-4,r1 <-- Here
fmov.s @r2,fr4
add #4,r1 <-- Here
fadd dr4,dr2
fmov.s fr2,@r1
fmov.s fr3,@-r1
Clearly, the marked instructions are useless and should be omitted.
SH4 doesn't allow for 64-bit load/stores and hence a DF mode load/store
insn is split into 3 insns (after reload) -> 2 32-bit load/stores and
one address arithmetic insn. These address arithmetic insns clutter the
code.
Also, ISP2 freedom is restricted due to unnecessary insns. The extreme case
is present in stress-1.17/layer3.i benchmark.
Is there any possibility of recombination of splitted instructions
with other insns? There is a lot of operators in scope - ADD, SUB,
OR, AND, Post/Pre Inc/Dec, etc. IMHO, it should clean the code on other
processors also.
Regards,
Rakesh Kumar