On Fri, Mar 28, 2025 at 12:20:18PM +0100, Jakub Jelinek wrote:
> Here is the incremental patch I was talking about.
> For noop sets, we don't need to test much, they can go to i2
> unless that would violate i3 JUMP condition.
> 
> With this the try_combine on the pr119291.c testcase doesn't fail,
> but succeeds and we get
> (insn 22 21 23 4 (set (pc)
>         (pc)) "pr119291.c":27:15 2147483647 {NOOP_MOVE}
>      (nil))
> (insn 23 22 24 4 (set (reg/v:SI 117 [ e ])
>         (reg/v:SI 116 [ e ])) 96 {*movsi_internal}
>      (expr_list:REG_DEAD (reg/v:SI 116 [ e ])
>         (nil)))
> (note 24 23 25 4 NOTE_INSN_DELETED)
> (insn 25 24 26 4 (set (reg/v:SI 116 [ e ])
>         (const_int 0 [0])) "pr119291.c":28:13 96 {*movsi_internal}
>      (nil))
> (note 26 25 27 4 NOTE_INSN_DELETED)
> (insn 27 26 28 4 (set (reg:DI 128 [ _9 ])
>         (const_int 0 [0])) "pr119291.c":28:13 95 {*movdi_internal}
>      (nil))
> after it.
> 
> Ok for trunk if this passes bootstrap/regtest?

Bootstrapped/regtested on x86_64-linux and i686-linux successfully.

> 2025-03-28  Jakub Jelinek  <ja...@redhat.com>
> 
>       * combine.cc (try_combine): Sets which satisfy set_noop_p can go
>       to i2 unless i3 is a jump and the other set is not.

        Jakub

Reply via email to