On Fri, Apr 04, 2025 at 01:08:31PM +0200, Eric Botcazou wrote:
> I guess the question is: how much do we pessimize if we tweak r0-6313 change?
> For example, we could say that a use of REG in the SET_SRC does not count if
> REG is also set in the SET_DEST *only* if there is no previous use of REG:
>
> case REG:
> if (x == dest)
> {
> if (incr > 0 && counts[REGNO (x)] != 0)
> counts[REGNO (x)] += incr;
> }
> else
> counts[REGNO (x)] += incr;
> return;
>
> IIUC this would both fix the bug and preserve the deletion if insn 26 and 27
> are swapped.
I'm afraid having different behavior for incr > 0 and incr < 0 could be a
problem, then we would not decrease it even if we've increased it
previously, so this would make setters of that REGNO effectively
undeletable.
Jakub