This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] Require that one of the operands be a register in thumb2_movdf_vfp
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: ÐÑÐÐÐ ÐÑÑÐÑÐÐÐ <ruben at ispras dot ru>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "ramana dot radhakrishnan at linaro dot org" <ramana dot radhakrishnan at linaro dot org>, "dm at ispras dot ru" <dm at ispras dot ru>
- Date: Fri, 14 Sep 2012 17:55:50 +0100
- Subject: Re: [PATCH][ARM] Require that one of the operands be a register in thumb2_movdf_vfp
- References: <CAFRJ5K0MvwH_Xyy=w2RGXZx9OPowWZj-OtwZLKOb9R_H9fBZ5w@mail.gmail.com>
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.