https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84842
Andrey Belevantsev <abel at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |abel at gcc dot gnu.org --- Comment #17 from Andrey Belevantsev <abel at gcc dot gnu.org> --- Created attachment 45991 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45991&action=edit tentative patch This is a rather complex situation. The assert checks that we have correctly calculated the availability bit, which tells us that the original destination insn register is free to use for the code motion. In our case we have merged several insns into one expression, and the resulting bit came from the variant when it was really unavailable; however, during looking for the original insn in the flow graph, we have been looking for really another variant, thus we didn't get to the place with the first variant and initially unavailable stuff. It can be fixed with the rather crude attached patch that somewhat relaxes the assert. While doing this, we need to mark the above situation has actually occurred, but we don't know which of the move_op or find_best_regs we're doing there -- Alexander, maybe you could come up with something better.