https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60641
--- Comment #2 from Alex Kruppa <akruppa at gmail dot com> --- With gcc-4.9.0, compiled from the official tarball, the foo() function does NOT produce the double movzwl instruction any more, but the bar() function still does. Dump of assembler code for function foo: 0x0000000000000000 <+0>: movzwl (%rdi),%edx 0x0000000000000003 <+3>: cmpb $0x0,(%rsi,%rdx,1) 0x0000000000000007 <+7>: mov %rdx,%rax 0x000000000000000a <+10>: mov $0x0,%edx 0x000000000000000f <+15>: cmove %edx,%eax 0x0000000000000012 <+18>: retq Dump of assembler code for function bar: 0x0000000000000020 <+0>: movzwl %si,%eax 0x0000000000000023 <+3>: movzwl %si,%esi 0x0000000000000026 <+6>: mov %esi,(%rdi,%rax,4) 0x0000000000000029 <+9>: retq