On Fri, Mar 29, 2019 at 10:50:04PM +1030, Alan Modra wrote: > On Fri, Mar 29, 2019 at 04:47:21AM -0500, Segher Boessenkool wrote: > > On Fri, Mar 29, 2019 at 04:00:55PM +1030, Alan Modra wrote: > > > On Thu, Mar 28, 2019 at 01:08:55PM -0500, Segher Boessenkool wrote: > > > > TARGET_DIRECT_MOVE is always on for these CPUs. Should this also use > > > > the > > > > m*vsr* cost with say -mcpu=power7 -mtune=power9? > > > > > > No, because if we don't generate m*vsr*, and we shouldn't, then that > > > would be telling a lie. > > > > Then should we have those "tune" things in this conditional? Just do it > > for any direct move target? > > Oh, right. I think we still need to "tune" the cost to reflect > actual hardware, but that shouldn't be in the outer condition. So > > if (TARGET_DIRECT_MOVE) > { > if (rs6000_tune != PROCESSOR_POWER9) > ret = 4 * hard_regno_nregs (0, mode); > else > ret = 2 * hard_regno_nregs (0, mode); > ... > > should be good enough.
Yes exactly. Segher