https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107172
--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Segher Boessenkool from comment #7)
> Please show the (relevant part of) output of -fdump-rtl-combine-all ? At
> least
> those parts where it decided (ltu:SI (const_int 1) (const_int 0)) is valid
> (it
> isn't) and where optimising that to (const_int 0) is valid (it isn't).
Trying 6, 62 -> 63:
6: r87:SI=0x2
62: {flags:CCC=r87:SI!=0;r96:SI=-r87:SI;}
REG_DEAD r87:SI
REG_UNUSED r96:SI
63: {r97:SI=-ltu(flags:CCC,0);clobber flags:CC;}
REG_DEAD flags:CCC
REG_UNUSED flags:CC
Failed to match this instruction:
(parallel [
(set (reg:SI 97)
(const_int 0 [0]))
(clobber (reg:CC 17 flags))
(set (reg:SI 96)
(const_int -2 [0xfffffffffffffffe]))
])
Failed to match this instruction:
(parallel [
(set (reg:SI 97)
(const_int 0 [0]))
(set (reg:SI 96)
(const_int -2 [0xfffffffffffffffe]))
])
Successfully matched this instruction:
(set (reg:SI 96)
(const_int -2 [0xfffffffffffffffe]))
Successfully matched this instruction:
(set (reg:SI 97)
(const_int 0 [0]))
allowing combination of insns 6, 62 and 63
original costs 4 + 0 + 8 = 0
replacement costs 4 + 4 = 8
deferring deletion of insn with uid = 62.
deferring deletion of insn with uid = 6.
modifying insn i2 62: r96:SI=0xfffffffffffffffe
deferring rescan insn with uid = 62.
modifying insn i3 63: r97:SI=0
deferring rescan insn with uid = 63.