https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109907
--- Comment #28 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #26) > (In reply to Andrew Pinski from comment #25) > > Created attachment 55175 [details] > > Patch which fixes `signed < 0` > > > > This patch improves comment #20 . > > Note this patch does not work for the case of normalizep == -1 but I have a > fix for that. Also note this patch improves (a lot): ``` unsigned char f(long long t) { return t < 0; } ``` Down to: ``` f: /* prologue: function */ /* frame size = 0 */ /* stack size = 0 */ .L__stack_usage = 0 mov r24,r25 rol r24 clr r24 rol r24 /* epilogue start */ ret ``` Rather than what it was in GCC 13: ``` f: push r16 ldi r16,lo8(63) rcall __lshrdi3 mov r24,r18 pop r16 ret ```