https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19792

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2016-08-06 00:00:00         |2019-3-4
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #7 from Steven Bosscher <steven at gcc dot gnu.org> ---
Still an issue as of "g++ (Compiler-Explorer-Build) 9.0.1 20190303
(experimental)" on x86-64 at -O2:

_Z3fooj:
        movslq  %edi, %rax
        movl    %edi, %edi
        movzbl  size_lookup(%rdi), %edx
        cmpb    %dl, size_lookup(%rax)
        sete    %al
        movzbl  %al, %eax
        ret
_Z3barj:
        movl    $1, %eax
        ret



FWIW "clang version 7.0.0 (tags/RELEASE_700/final 342594)" at -O2:

_Z3fooj:                                # @_Z3fooj
        movslq  %edi, %rax
        movb    size_lookup(%rax), %cl
        movl    %eax, %edx
        xorl    %eax, %eax
        cmpb    size_lookup(%rdx), %cl
        sete    %al
        retq
_Z3barj:                                # @_Z3barj
        movl    $1, %eax
        retq



and "icc (ICC) 19.0.1.144 20181018":

_Z3fooj:
        xorl      %eax, %eax                                    #6.36
        movslq    %edi, %rdi                                    #6.11
        movb      size_lookup(%rdi), %dl                        #6.11
        movl      %edi, %edi                                    #6.36
        cmpb      size_lookup(%rdi), %dl                        #6.36
        sete      %al                                           #6.36
        ret                                                     #6.36
_Z3barj:
        movl      $1, %eax                                      #13.15
        ret

Reply via email to