https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64669
--- Comment #8 from Richard Henderson <rth at gcc dot gnu.org> --- Indeed, if I force used_in_cond_stmt_p to return false, which forces the use of the emit_cstore path, which means we return a proper boolean value instead of a CCmode value, the test case doesn't ICE. Moreover, combine does in fact remove the redundant compare and we are left with cmp w0, 39 ccmp w0, 10, 4, ne bne .L19 I think I was wrong to approve the ccmp patch with the used_in_cond_stmt_p logic in the first place, and that it should all be removed.