On Wed, Sep 29, 2021 at 04:32:19PM +0800, HAO CHEN GUI wrote: > The patch punishes reload of alternative pair of "d, Z" for > movsi_internal1. The reload occurs if 'Z' doesn't match and generates an > additional insn. So the memory reload should be punished.
As David says, why only for loads? But also, why not for lxsiwzx (and stxsiwx) as well? But, what for all other uses of lfiwzx? And lfiwax? We need to find out why the register allocator considers it a good idea to use FP regs here, and fix *that*? The extra insn you talk about is because this insn only allows indexed addressing ([reg+reg] or [reg] addressing). That is true for very many insns. Reload (well, LRA in the modern world) should know about such extra costs. Does it not? > gcc/ > * gcc/config/rs6000/rs6000.md (movsi_internal1): disparages > slightly the alternative 'Z' of "lfiwzx" when reload is > needed. "Disparage", no "s". Changelog entries are written in the imperative. Segher
