https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52345
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For the trunk, they all come close (at least for aarch64): f: cmp w0, 0 cset w0, ne orr w1, w0, w1 cmp w1, 0 cset w0, ne ret .size f, .-f .align 2 .p2align 3,,7 .global f1 .type f1, %function f1: cmp w0, 0 ccmp w1, 0, 0, eq cset w0, ne ret .size f1, .-f1 .align 2 .p2align 3,,7 .global f2 .type f2, %function f2: orr w0, w0, w1 cmp w0, 0 cset w0, ne ret f1 and f2 are similar enough for aarch64 (at least for ThunderX).