This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] type promotion pass
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: "dje dot gcc at gmail dot com" <dje dot gcc at gmail dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>, "wschmidt at linux dot vnet dot ibm dot com" <wschmidt at linux dot vnet dot ibm dot com>
- Cc: "kugan dot vivekanandarajah at linaro dot org" <kugan dot vivekanandarajah at linaro dot org>, Richard Biener <richard dot guenther at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, nd <nd at arm dot com>, "prathamesh dot kulkarni at linaro dot org" <prathamesh dot kulkarni at linaro dot org>
- Date: Fri, 15 Sep 2017 13:47:58 +0000
- Subject: Re: [RFC] type promotion pass
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- References: <DB6PR0801MB2053C1BC62931E4B9DEE87CF836C0@DB6PR0801MB2053.eurprd08.prod.outlook.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
David Edelsohn wrote:
> Why does AArch64 define PROMOTE_MODE as SImode? GCC ports for other
> RISC targets mostly seem to use a 64-bit mode. Maybe SImode is the
> correct definition based on the current GCC optimization
> infrastructure, but this seems like a change that should be applied to
> all 64 bit RISC targets.
The reason is that AArch64 supports both 32-bit registers, so when using char/short
you want 32-bit operations. There is an issue in that WORD_REGISTER_OPERATIONS
isn't set on AArch64, but it should be. Maybe that requires some cleanups and ensure it
correctly interacts with PROMOTE_MODE. There are way too many confusing target
defines like this and no general mechanism that just works like you'd expect. Promoting
to an orthogonal set of registers is not something particularly unusual, so it's something
GCC should support well by default...
Wilco