https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69896
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 37757 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37757&action=edit gcc6-pr69896.patch Untested fix. regcprop (which is invoked on the first bb by prepare_shrink_wrap) ignores noop_p moves, which is fine if they are done in the mode we remember for the register, but if it is narrower, it is wrong. The patch removes them if DCE would remove them, and keeps around otherwise (but in that case makes sure we actually update the mode etc.).