https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78327
Marc Glisse <glisse at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- Already in the original dump, we can see that the comparisons are optimized to different shapes: - if ((signed char) ((unsigned char) n + 125) < 0) + if ((unsigned char) n + 125 > 126) For the second one, VRP knows how to build an assert_expr and interpret the consequences on n, while for the first one it doesn't. Since we turn nice comparisons into the first shape, I guess we should teach VRP to recognize it.