Re: Basic REG_EQUIV comprehension question

2022-09-15 Thread Robin Dapp via Gcc-patches
> Yeah, rtx_costs (or preferably insn_cost, if that works) seem like the > best way of addressing this. If the target says that register moves are > cheaper than constant moves then it's a feature that CSE & co remove > duplicate constants. The REG_EQUIV note is still useful in those cases > beca

Re: Basic REG_EQUIV comprehension question

2022-09-15 Thread Richard Sandiford via Gcc-patches
Robin Dapp via Gcc-patches writes: > Hi, > > I have been working on making better use of s390's vzero instruction. > Currently we rather zero a vector register once and load it into other > registers via vlr instead of emitting multiple vzeros. > > At IRA/reload point we e.g. have > > (insn 8 5 19

Re: Basic REG_EQUIV comprehension question

2022-09-15 Thread Robin Dapp via Gcc-patches
Small addition to clarify: (insn 8) from the example is of course matched to a vzero. The "problem" begins when (reg 64) is later moved into another register and the (const_vector) has been optimized to a single definition e.g. by CSE, i.e. we have several (insn yy (set (reg:V2DI xx) (reg:V2DI 6

Basic REG_EQUIV comprehension question

2022-09-15 Thread Robin Dapp via Gcc-patches
Hi, I have been working on making better use of s390's vzero instruction. Currently we rather zero a vector register once and load it into other registers via vlr instead of emitting multiple vzeros. At IRA/reload point we e.g. have (insn 8 5 19 2 (set (reg/v:V2DI 64 [ zero ]) (const_vec