[PATCH 2/8] [RS6000] rs6000_rtx_costs for AND

Hans-Peter Nilsson hp@bitrange.com
Fri Oct 23 23:18:44 GMT 2020


On Thu, 22 Oct 2020, Alan Modra via Gcc-patches wrote:

Hi!

> On Wed, Oct 21, 2020 at 03:29:11PM -0500, Segher Boessenkool wrote:
> > Anyway:
> >
> > +              || (outer_code == AND
> > +                  && rs6000_is_valid_2insn_and (x, mode)))
> >         {
> >           *total = COSTS_N_INSNS (1);
> >           return true;
> >
> > It should return COSTS_N_INSNS (2) for that?
>
> No, it should not!
>
>       /* (reg) is costed at zero by rtlanal.c:rtx_cost.  That sets a
> 	 baseline for rtx costs:  If a constant is valid in an insn,
> 	 it is free.  */

>From where is this quote?  My "git grep" fails to find it for me
(on master).  It seems like a port-specific commment so I'd
have expected to find it somewhere in config/rs6000.

brgds, H-P


More information about the Gcc-patches mailing list