This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Tighten checking for 'X' constraints
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Robert Suchanek <Robert dot Suchanek at imgtec dot com>
- Date: Wed, 16 Apr 2014 11:44:44 +0100
- Subject: Re: RFA: Tighten checking for 'X' constraints
- Authentication-results: sourceware.org; auth=none
- References: <87sipejow3 dot fsf at talisman dot default> <CA+=Sn1mB5V=hhJiALC2+z0oZZJSUqSE-m8-y4G-thbVTEo=wew at mail dot gmail dot com>
Andrew Pinski <pinskia@gmail.com> writes:
> On Tue, Apr 15, 2014 at 1:53 PM, Richard Sandiford
> <rdsandiford@googlemail.com> wrote:
>> As Robert pointed out here:
>>
>> http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00416.html
>>
>> we're a bit too eager when folding stuff into an 'X' constraint.
>> The value at expand time is sensible, but after that asm_operand_ok
>> allows arbitrary rtx expressions, including any number of registers
>> as well as MEMs with unchecked addresses.
>>
>> This is a target-independent problem, as shown by the testcase below.
>> Reload would give bogus "impossible constraint in asm" errors
>> while LRA ICEs.
>>
>> Tested on x86_64-linux-gnu. OK to install?
>
> AARCH64 ran into something similar and we did a similar patch though
> rejecting only mems which are invalid:
> http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00765.html
> (http://gcc.gnu.org/ml/gcc-patches/2013-01/msg01128.html)
Sorry, missed that. I went for the same thing at first, but the second
example in the testcase shows that it's needed for non-MEM operands too.
Thanks,
Richard