On Tue, Oct 27, 2015 at 06:06:12PM +0000, Kyrill Tkachov wrote:
> Hi all,
> 
> This is another RTL checking error occuring in the splitting condition of the
> mov-immediate patterns.  We take a REGNO of operands[0] which is a
> nonimmediate_operand.  Since the immediate splitting code only makes sense
> when the destination is a register, we should be guarding that condition on
> REG_P (operands[0]).
> 
> The reported error occurs on the *movdi_aarch64 pattern but I see the same
> vulnerability in the *movsi_aarch64 pattern, although I wasn't able to get it
> to trigger an ICE.
> 
> This patch adds a REG_P check on the splitting condition of both.  The
> testcase (taken from the BZ for PR 68102 and with an #if 1 removed)now
> compiles fine on an aarch64 compiler with RTL checking enabled.
> Bootstrapped and tested on aarch64-linux with RTL checking enabled.
> 
> Ok for trunk?

OK.

> Thanks,
> Kyrill
> 
> The BZ says this occurs on the GCC 5 branch but I don't have a checking
> compiler from that branch yet. I'll be investigating whether to backport this
> patch there in the meantime.

Sounds good to me.

Thanks,
James

> 
> 2015-10-27  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
> 
>     PR target/68102
>     * config/aarch64/aarch64.md (*movsi_aarch64): Check that
>     operands[0] is a reg before taking its REGNO in split condition.
>     (*movdi_aarch64): Likewise.
> 
> 2015-10-27  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
> 
>     PR target/68102
>     * gcc.target/aarch64/pr68102_1.c: New test.

Reply via email to