https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107172
--- Comment #37 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Segher Boessenkool from comment #33) > (In reply to H.J. Lu from comment #32) > > > There is no actual comparison with 0, that is just notation. > > > > True. But simplify-rtx.cc simplifies > > > > (ltu (reg 17) (const_int 0)) > > > > to false when reg 17 is set. > > Is set? What does that even mean? Is set to what? (reg 17) was set to 1. > > Use the actual comparison isn't issue. The issue is how > > > > (ltu (reg 17) (const_int 0)) > > > > should be simplified when reg 17 is known to be set. > > You need to look at the setter. It cannot be simplified otherwise. The backend knows how to evaluate (ltu:SI (const_int 1 [0x1]) (const_int 0 [0])) from (ltu:SI (reg:CCC 17 flags) (const_int 0 [0])) where (reg:CCC 17 flags) was set to a constant by backend.