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. */ -- Alan Modra Australia Development Lab, IBM