Hi Richard,

>> Note that aarch64_internal_mov_immediate may be called after reload,
>> so it would end up even more complex.
>
> The sequence I quoted was supposed to work before and after reload.  The:
>
>                rtx tmp = aarch64_target_reg (dest, DImode);
>
> would create a fresh temporary before reload and reuse dest otherwise.
> So the sequence after reload would be the same as in your patch,
> but the sequence before reload would use a temporary.

aarch64_target_reg just returns the input register so it won't do that.
Also the movsi/movdi patterns only split if the destination register is 
physical.
That's typically after register allocation but not uniformly so (eg. immediates 
in
returns will get split early), which is inconsistent. Given we always emit 
register
notes it's not obvious whether splitting early or late is better overall.

Cheers,
Wilco

Reply via email to