https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63390
--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Oleg Endo from comment #1) > .L4: > mov.l @r9,r4 <<<< constant load > shlr r4 > tst r4,r4 > bt .L2 > mov.l .L12,r5 > jsr @r10 > nop > dt r8 > bf .L4 > .L10: > lds.l @r15+,pr > mov.l @r15+,r10 > mov.l @r15+,r9 > rts > mov.l @r15+,r8 I've marked the wrong load insn as constant load. In this case hoisting it out of the loop wouldn't make lots of sense, since it's loaded into the call clobbered register r5. Bad example. But it would still be better to hoist the load into the preceding basic block.