https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15533
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This looks improved in GCC 4.4.7 and above:
fn(unsigned short):
movzbl a, %edx
xorb %al, %al
orl %edx, %eax
ret