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 tree-optimization/82187] missed PRE at -O3


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-09-12
                 CC|                            |rguenth at gcc dot gnu.org
            Summary|missing optimization        |missed PRE at -O3
                   |pointer to char*            |
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I see with -O2:
.L4:
        movzbl  (%rax), %edx
        cmpb    $97, %dl
        je      .L5
.L2:
        addq    $1, %rax
        testb   %dl, %dl
        jne     .L4
        xorl    %eax, %eax
        ret
.L5:
        movl    $1, %eax
        ret

so a single load in the loop.  Something messes up at -O3.

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