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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
aarch64 code gen:
-UMANUAL:
```
_Z3watRKiS0_:
        ldr     w3, [x0]
        mov     w2, 1
        ldr     w0, [x1]
        cmp     w3, w0
        csinv   w0, w2, wzr, ge
        csel    w0, w0, wzr, ne
        ret
```

vs:
```
_Z3watRKiS0_:
        .cfi_startproc
        ldr     w2, [x0]
        ldr     w0, [x1]
        cmp     w2, w0
        cset    w0, gt
        csinv   w0, w0, wzr, ge
        ret
```

Which is only slightly worse. It comes from rotation of the compares.
Manual uses </> while the other side uses !=/< .

Reply via email to