This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: regrename: don't overflow insn_rr_info
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 6 Nov 2015 11:34:08 +0000
- Subject: Re: regrename: don't overflow insn_rr_info
- Authentication-results: sourceware.org; auth=none
- References: <563C8A38 dot 10209 at t-online dot de> <563C8C54 dot 30508 at foss dot arm dot com> <563C8F85 dot 4070400 at redhat dot com>
On 06/11/15 11:31, Bernd Schmidt wrote:
> On 11/06/2015 12:17 PM, Ramana Radhakrishnan wrote:
>> On 06/11/15 11:08, Bernd Schmidt wrote:
>>> This one is a fix for something that could currently only affect c6x, but I have code that exposes it on i386.
>>>
>>> When optionally gathering operand info in regrename, we can overflow the array in certain situations. This can occur when we have a situation where a value is constructed in multiple small registers and then accessed as a larger one (CDImode in the testcase I have). In that case we enter the "superset" path, which fails the involved chains, but the smaller pieces still all get seen by record_operand_use, and there may be more of them than MAX_REGS_PER_ADDRESS.
>>>
>>> The following fixes it. Bootstrapped and tested with -frename-registers enabled at -O1 on x86_64-linux. Ok?
>>>
>>>
>>> Bernd
>>
>> This sounds like it will fix http://gcc.gnu.org/PR66785 ...
>
> Ah, I didn't realize something else was using this functionality:
>
> gcc/config/aarch64/cortex-a57-fma-steering.c
> 1025: regrename_init (true);
>
> Yeah, the description of that bug makes it sound like the same issue.
Yeah looks like the ICE goes away with a quick spin - I've not done any deeper analysis but that looks like a fix.
I'll take the opportunity to point out gcc11{3-6} if you need an aarch64 machine on the compile farm if you wanted access to one.
regards
Ramana
>
>
> Bernd