https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102178
--- Comment #13 from hubicka at kam dot mff.cuni.cz --- > > According to znver2_cost > > > > Cost of sse_to_integer is a little bit less than fp_store, maybe increase > > sse_to_integer cost(more than fp_store) can helps RA to choose memory > > instead of GPR. > > That sounds reasonable - GPR<->xmm is cheaper than GPR -> stack -> xmm > but GPR<->xmm should be more expensive than GPR/xmm<->stack. As said above > Zen2 can do reg -> mem, mem -> reg via renaming if 'mem' is somewhat special, > but modeling that doesn't seem to be necessary. > > We seem to have store costs of 8 and load costs of 6, I'll try bumping the > gpr<->xmm move cost to 8. I was simply following latencies here, so indeed reg<->mem bypass is not really modelled. I recall doing few experiments which was kind of inconclusive.