[Bug target/51821] [4.5/4.6/4.7 Regression] 64bit > 32bit conversion produces incorrect results with optimizations

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 11 11:28:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51821

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
          Component|c                           |target

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-11 11:28:08 UTC ---
I believe this is a target issue.  We produce

test:
.LFB0:
        .cfi_startproc
        movl    4(%esp), %ecx
        movl    $-1, %eax
        xorl    %edx, %edx
        sall    %cl, %eax
        testb   $32, %cl
        cmovne  %eax, %edx
        cmovne  %edx, %eax
        ret

but as this is a SHIFT_COUNT_TRUNCATED target the sall instruction does
nothing, so shifting DImode by 32 is not implemented correctly on i?86
(ix86_split_ashl).



More information about the Gcc-bugs mailing list