This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Improve aarch64_legitimate_constant_p
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Thu, 26 Oct 2017 16:38:54 +0100
- Subject: Re: [PATCH][AArch64] Improve aarch64_legitimate_constant_p
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <AM5PR0802MB2610272348FB1C5DADA9665C83AA0@AM5PR0802MB2610.eurprd08.prod.outlook.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Fri, Jul 07, 2017 at 12:28:11PM +0100, Wilco Dijkstra wrote:
> This patch further improves aarch64_legitimate_constant_p. Allow all
> integer, floating point and vector constants. Allow label references
> and non-anchor symbols with an immediate offset. This allows such
> constants to be rematerialized, resulting in smaller code and fewer stack
> spills.
>
> SPEC2006 codesize reduces by 0.08%, SPEC2017 by 0.13%.
>
> Bootstrap OK, OK for commit?
This is mostly OK, but I think you lose one case we previosuly permitted,
buried in aarch64_classify_address (the CONST case).
OK with that case handled too (assuming that passes a bootstrap and test).
Reviewed by: James Greenhalgh <james.greenhalgh@arm.com>
Thanks,
James
>
> ChangeLog:
> 2017-07-07 Wilco Dijkstra <wdijkstr@arm.com>
>
> * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
> Return true for more constants, symbols and label references.
> (aarch64_valid_floating_const): Remove unused function.
>