This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, tentative, reload] Make push_reload work with more types of subregs?
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 9 Aug 2016 14:14:44 +0200
- Subject: Re: [Patch, tentative, reload] Make push_reload work with more types of subregs?
- Authentication-results: sourceware.org; auth=none
- References: <8760rqi5d1.fsf@atmel.com> <d46a7150-ddaf-01e2-aa37-c339e7aaec83@redhat.com> <87oa53gu46.fsf@atmel.com>
On 08/08/2016 05:26 PM, Senthil Kumar Selvaraj wrote:
I picked out the commit where you'd added SYMBOL_REF handling (rev
#190252), and patched that with the below code. Bootstrapped and
regtested on x86_64-pc-linux - the results were identical with and
without the patch. Is this good enough for trunk?
- else if (GET_CODE (SUBREG_REG (in)) == SYMBOL_REF)
+ else if (GET_CODE (SUBREG_REG (in)) == SYMBOL_REF
+ || CONSTANT_P (SUBREG_REG (in))
+ || GET_CODE (SUBREG_REG (in)) == PLUS)
subreg_in_class = find_valid_class_1 (inmode,
GET_MODE (SUBREG_REG (in)),
rclass);
Actually SYMBOL_REF should also be CONSTANT_P. For integers it looks
like it'll pass VOIDmode to find_valid_class_1 and just return NO_REGS.
which I suppose is OK.
Would you mind removing the SYMBOL_REF test and retesting? Ok with that
change.
Bernd