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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
aarch64 GCC is able to compile it to:
f(unsigned int, unsigned int):
        cmp     w1, 0
        ccmp    w1, w0, 2, ne
        cset    w0, ls
        ret

While aarch64 LLVM does:
        sub     w8, w1, #1
        cmp     w8, w0
        cset    w0, lo
        ret

depending on the pipeline, they might be the same or the ccmp might be better
slightly.

Reply via email to