https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69416
--- Comment #5 from Richard Henderson <rth at gcc dot gnu.org> --- Created attachment 37419 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37419&action=edit proposed patch I'm testing the following, but it does produce correct results on a spot check of emit-rtl.c:1833. We do leave a missed-optimization on the table, in that the (compare:CC (const_int 29) (const_int 0)) subexpression isn't optimized. But that's something do addresss in gcc7.