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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |target

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also the other issue is two cmov back-to-back might be bad on x86_64.

In fact on aarch64 we get for sort2_if:
sort2_if(int, int, int*, int*):
        cmp     w0, w1
        csel    w4, w0, w1, lt
        str     w4, [x2]
        csel    w1, w1, w0, lt
        str     w1, [x3]
        ret

So the question is a cmov better than a branch here, I don't know.

Reply via email to