https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107172
--- Comment #30 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to H.J. Lu from comment #26) > LTU/GEU are only used to check FLAGS_REG against constant 0. That is not what (ltu (reg 17) (const_int 0)) means though? Together with a previous (set (reg 17) (compare A B)) it means the result of A <= B. There is no actual comparison with 0, that is just notation. > simplify_const_relational_operation has > > /* We can't simplify MODE_CC values since we don't know what the > actual comparison is. */ > if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_CC) > return 0; And combine *does* know how to find the actual comparison, in many cases. Some other passes can as well, there is no magic involved, you just need to look at other insns as well (just one really, the CC setter).