https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116896
--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Uroš Bizjak from comment #5) > (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. Oh, I misread the instruction. It is a normal SUB, not SBB. :(