This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Tighten checking for 'X' constraints


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]