https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83726

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Steve Ellcey from comment #7
> pr83081.f90 looks like a new test so it may not actually be a regression
> related to this patch, but the first two are.  pr79041-2 generates:
> 
> t:
>       mov     x0, 0
>       mov     x1, 65536
>       ret
> 
> with the patch rather than:
> 
> t:
>       adr     x0, .LC0
>       ldp     x0, x1, [x0]
>       ret
>       .size   t, .-t
>       .align  4
> .LC0:
>       .xword  0
>       .xword  65536

The first code generation is better than doing a load.  That is doing two mov
is better than doing an adr/ldp in terms of size and even ldp could miss the
cache  while the two mov are independent and can most likely be executed on the
same pipeline.

Reply via email to