https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84527
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed:
int f1 (int a, int b) { return a < b ? -1 : 1; }
int f2 (unsigned a, unsigned b) { return a < b ? -1 : 1; }
unsigned f3 (int a, int b) { return a < b ? -1 : 1; }
unsigned f4 (unsigned a, unsigned b) { return a < b ? -1 : 1; }
shows that we emit the code you want to see for f2 and f4, but that just means
it is not the right code for f1 and f3.