https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97954
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:404d0ca7820bbf258e2edfac423403ee31b48a7b commit r11-5613-g404d0ca7820bbf258e2edfac423403ee31b48a7b Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Dec 1 16:23:59 2020 +0100 loop-invariant: JUMP_INSNs aren't loop invariant [PR97954] The following testcase ICEs because loop invariant motion moves asm goto with a single output as invariant. Normally, jumps aren't really moved, because if they are single set, they have their SET_DEST (pc) and pc_rtx has VOIDmode on which one of the functions find_invariant_insn calls bails out. The code already punts on insns that can throw or trap. And for asm goto without outputs, it isn't single set, or asm goto with two or more outputs it isn't single set either. 2020-12-01 Jakub Jelinek <ja...@redhat.com> PR rtl-optimization/97954 * loop-invariant.c (find_invariant_insn): Punt on JUMP_P insns. * gcc.dg/pr97954.c: New test.