https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110170
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-linux-gnu --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note for aarch64, we do produce conditional moves but only when there is a loop. That is: ``` __attribute__((noinline)) void __cond_swap(double* __x, double* __y) { for(int i = 0; i < 100; i++, __x++, __y++) { double __r = (*__x < *__y); double __tmp = __r ? *__x : *__y; *__y = __r ? *__y : *__x; *__x = __tmp; } } ``` Produces: ``` .L3: ldr d31, [x0, x2] ldr d30, [x1, x2] fcmpe d31, d30 fcsel d29, d30, d31, mi fcsel d31, d31, d30, mi str d29, [x1, x2] str d31, [x0, x2] add x2, x2, 8 cmp x2, 800 bne .L3 ``` Otherwise it will duplicate the return basic block (which is expected). So this is a x86_64 specific issue.