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

Kael Franco <kaelfandrew at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Missed X86 optimization of  |Missed LLVM's or disjoint
                   |or to use lea when x < CST  |detection to lea for X86

--- Comment #2 from Kael Franco <kaelfandrew at gmail dot com> ---
More general test in PR127013 comment 2.
https://godbolt.org/z/c1sK1cGhb

GCC -O2 assembly:
"src_add":
        lea     eax, [rdi+rsi]
        ret
"src_or":
        mov     eax, edi
        or      eax, esi
        ret
"src_xor":
        mov     eax, edi
        xor     eax, esi
        ret

Reply via email to