https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85730
--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> --- Created attachment 51564 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51564&action=edit Prototype patch Attached patch works around reload problem and creates: movl %edi, %eax movb %dil, %al addb %al, %al ret for all cases. Please note that some follow-up pass is needed to remove "movb %dil, %al", since preceding instruction already moves full value from %edi to %eax, so partial move is not needed.