https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94873
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Ok, so what we do about this bug then if it ought to be combine.c that needs changing? For REG_EQUAL notes in combine_instructions check for the auto-incdec side-effects in the pattern (I'd hope we don't have them in REG_EQUAL notes content) and if there are any, punt? At least for backporting that seems like the right solution, and given that it seems try_combine also punts on these if we remove or add any in the patterns, it seems in line with what the rest of combiner does. Or, shall it e.g. queue the side-effects in some new argument to try_combine and if the combination would succeed, add the side-effect as yet another instruction (if it can match and is cheaper than what we have previously)?