This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AARCH64]Use mov for add with large immediate.
- From: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- To: Renlin Li <renlin dot li at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 1 May 2015 11:19:45 +0100
- Subject: Re: [PATCH][AARCH64]Use mov for add with large immediate.
- Authentication-results: sourceware.org; auth=none
- References: <55367660 dot 5080808 at arm dot com>
On 21 April 2015 at 17:10, Renlin Li <renlin.li@arm.com> wrote:
> Hi all,
>
> This is a simple patch to generate a move instruction to temporarily hold
> the large immediate for a add instruction.
>
> GCC regression test has been run using aarch64-none-elf toolchain. NO new
> issues.
>
> Okay for trunk?
>
> Regards,
> Renlin Li
>
> gcc/ChangeLog:
>
> 2015-04-21 Renlin Li <renlin.li@arm.com>
>
> * config/aarch64/aarch64.md (add<mode>3): Use mov when allowed.
A couple style nits:
HOST_WIDE_INT imm = INTVAL (operands[2]);
-
- if (imm < 0)
Don't remove the blank line between declarations and the first statement.
+ if (aarch64_move_imm (imm, <MODE>mode)
+ && can_create_pseudo_p ())
+ {
The indentation of { should conform to the gnu style guide.
It also looks to me that an unbroken line will fit within the 80
column limit, hence the break before && is unnecessary.
Cheers
/Marcus