On Mon, Mar 09, 2026 at 11:59:14AM +0530, Avinash Jayakar wrote:
> Pinging this patch. Actually the need for this enhancement was observed
> from PR106536 where,
>
> int compare2(unsigned long long a, unsigned long long b)
> {
> return (a > b ? 1 : (a < b ? -1 : 0));
> }
> this was not being recognized as spaceship but on the other hand
>
> int compare2(unsigned long long a, unsigned long long b)
> {
> return (a == b ? 0 : (a < b ? -1 : 1));
>
>
> }
> this one was. And I think identifying it as spaceship generates better
> code than if not.
Is this a regression? If not, it feels to me more like stage1 material.
Jakub