[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    Re: [PATCH, AArch64] Add secondary reload for immediates into FP_REGS
From:       Richard Earnshaw <rearnsha () arm ! com>
Date:       2013-07-31 10:14:25
Message-ID: 51F8E381.6040302 () arm ! com
[Download RAW message or body]

On 30/07/13 14:28, Ian Bolton wrote:
> Our movdi_aarch64 pattern allows moving a constant into an FP_REG,
> but has the constraint Dd, which is stricter than the one for
> moving a constant into a CORE_REG.  This is due to restricted values
> allowed for MOVI instructions.
>
> Due to the predicate for the pattern allowing any constant that is
> valid for the CORE_REGs, we can run into situations where IRA/reload
> has decided to use FP_REGs but the value is not actually valid for
> MOVI.
>
> This patch introduces a secondary reload to handle this case.
>
> Supplied with testcase that highlighted original problem.
> Tested on Linux GNU regressions.
>
> OK for trunk?
>
> Cheers,
> Ian
>
>
> 2013-07-30  Ian Bolton  <ian.bolton@arm.com>
>
> gcc/
>          * config/aarch64/aarch64.c (aarch64_secondary_reload)): Handle
>          constant into FP_REGs that is not valid for MOVI.
>
> testsuite/
>          * gcc.target/aarch64/movdi_1.c: New test.
>

I think you should be using TARGET_PREFERRED_RELOAD_CLASS for this case. 
  The documentation for that seems to be describing exactly the 
situation you are facing.

R.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic