https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78559
--- Comment #11 from Bernd Schmidt <bernds at gcc dot gnu.org> --- Looks like other_insn is only used for cases where we rewrite cc sets in this way, so Bin's patch does look reasonably narrow. We could maybe record the CC reg being changed and only discard reg notes, but in my testing I've not been able to produce code generation differences except for the testcase. Let's wait for Segher's testing, but I think the patch is OK.