This is the mail archive of the gcc-patches@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: [PATCH][ARM] Require that one of the operands be a register in thumb2_movdf_vfp


On 14/09/12 15:58, ÐÑÐÐÐ ÐÑÑÐÑÐÐÐ wrote:
> Hi,
> 
> There are some Thumb2 patterns in vfp.md which are duplicated with only
> minor changes from their ARM equivalents.  This patch adds requirement
> in "*thumb2_movdf_vfp" pattern, that one of the operands sould be register,
> like in ARM "*movdf_vfp" pattern.
> 
> There is one functional change: the ARM "*movdf_vfp" pattern disallows the
> [mem]=const store case while the Thumb2 one does not.  The ARM version is
> more desirable, because [mem]=const would be split anyway and add temporary
> vfp register.
> 
> Example:
> 
> double delta;
> 
> void foo ()
> {
>   delta = 0.0;
> }
> 
> Generated code (without patch):
> Compiler options: g++ -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
> -mfloat-abi=softfp -mthumb -O2
> 
>         movs    r0, #0
>         movs    r1, #0
>         fmdrr   d16, r0, r1
>         fstd    d16, [r3, #0]
> 
> Generated code (with patch):
> 
>         movs    r0, #0
>         movs    r1, #0
>         strd    r0, [r3]
> 
> Regtested with QEMU-ARM.
> 
> Code size: SPEC2K INT and FP sizes both decrease by ~0.2% (up to 2.64%
> on 252.eon).
> Performance: 252.eon +4.3%, other tests almost unaffected;
> SPEC2K FP grows by 0.16% (up to 1.8% on 183.equake).
> (Detailed data below).
> 
> Ok for trunk?
> 
> 

OK.

R.




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