This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/34653] operation performed unnecessarily in 64-bit mode



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]