Hi Jeff,

On Sun, 2020-05-31 at 11:20 -0600, Jeff Law via Gcc-patches wrote:
> 
> The peephole2 pass makes some attempt to update various notes, but that 
> doesn't
> include REG_INC notes.  While I could trivially fix this in the H8 port, I
> wouldn't be terribly surprised if the lack of a REG_INC note could cause 
> problems
> on other ports.  So I think it's best to fix in the peephole pass.
> 
> As it turns out we already have  a function (two copies even!) to scan an insn
> for auto-inc addressing modes and add an appropriate note.
> 
> This patch moves that code from reload & lra into rtlanal.c and calls it from 
> the
> peephole pass.

I ran into this issue a while ago.
See also config/sh/sh.c, function sh_check_add_incdec_notes.

Is it possible to somehow fold all that into a universal solution?

Cheers,
Oleg

Reply via email to