https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116896
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Jakub Jelinek from comment #4) > I think it wouldn't be that hard to change optimize_spaceship to also handle > integer comparisons, just change that !SCALAR_FLOAT_TYPE_P (TREE_TYPE > (arg1)) to that || INTEGRAL_TYPE_P (TREE_TYPE (arg1)) and add the optab to > targets where it is a win. > The important question is what is the optimal sequence... setl %al setg %cl subb %al, %cl The one above (note also CF processing in SUBB) should be close to optimal, considering that no predication is involved here.