https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322
--- Comment #5 from Barry Revzin <barry.revzin at gmail dot com> ---
Sorry meant to actually copy the reduction:
#include <compare>
bool compare_count(int a, int b)
{
return a > b;
}
bool compare(int a, int b)
{
return (a <=> b) > 0;
}
which generates:
compare_count(int, int):
cmp r0, r1
ite le
movle r0, #0
movgt r0, #1
bx lr
compare(int, int):
cmp r0, r1
beq .L4
blt .L5
movs r0, #1
.L3:
cmp r0, #0
ite le
movle r0, #0
movgt r0, #1
bx lr
.L4:
movs r0, #0
b .L3
.L5:
mov r0, #-1
b .L3