https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82682
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The effect of the patch on the testcase is: .L3: movzbl (%edx), %esi addl $2, %edx movzbl -1(%edx), %eax addl $1, %ecx - movl %esi, %ebx imull $38470, %eax, %eax - movzbl %bl, %esi imull $19595, %esi, %esi addl %esi, %eax sarl $16, %eax movb %al, -1(%ecx) cmpl %edi, %edx where the useless movl %esi, %ebx isn't removed by the REE pass itself, but by rtl_dce later on. In any case, no extra copy insn is generated in this case, we just keep around the QI %ebx = QI %esi insn in case the register is used later on.