------- Comment #7 from ubizjak at gmail dot com 2009-10-03 12:48 ------- We regressed on the example from comment #1.
gcc-4.3 with -O2 generates: foo: movzbl (%rdi), %edx movq %rdx, %rax shrq $4, %rdx andl $15, %eax movq table(,%rax,8), %rax addq table(,%rdx,8), %rax ret And gcc-4.4+ -O2 generates: foo: movzbl (%rdi), %eax movq %rax, %rcx >> movq %rax, %rdx andl $15, %ecx shrq $4, %rdx movq table(,%rcx,8), %rax addq table(,%rdx,8), %rax ret Please note extra move. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34653