On Tue, Sep 15, 2020 at 10:49:43AM +0930, Alan Modra wrote:
> This small patch to rs6000_rtx_const considerably improves code

(_costs)

> generated for large constants in 64-bit code, teaching gcc that it is
> better to load a constant from memory than to generate a sequence of
> up to five dependent instructions.  Note that the rs6000 backend does
> generate large constants as loads from memory at expand time but
> optimisation passes replace them with SETs of the value due to not
> having correct costs.
> 
>       PR 94393
>       * config/rs6000/rs6000.c (rs6000_rtx_costs): Cost multi-insn
>       constants.

Okay for trunk.  Note that some p10 insns take a floating point
immediate, but those need to be handled specially anyway.

Thanks!


Segher

Reply via email to