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

--- Comment #1 from Dávid Bolvanský <david.bolvansky at gmail dot com> ---
Codegen:
https://godbolt.org/z/7EvYj9

foo:
        movabs  rdx, -6148914691236517205
        mov     rax, rdi
        mul     rdx
        mov     rax, rdx
        and     rdx, -2
        shr     rax
        add     rdx, rax
        xor     eax, eax
        cmp     rdi, rdx
        setnb   al
        ret
N:
        .quad   3

Can be optimized to return true

Reply via email to