https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116896
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I'll try to tweak the .SPACESHIP discovery, so that it will also check for the common case where the .SPACESHIP result is solely used in comparisons leading to -1, 0, 1, 2 (or -1, 0, 1) PHI and in that case pass another argument to .SPACESHIP to tell the expander that it wants to produce integer value rather than wants to compare based on that (and remove the PHI and just use the .SPACESHIP result). And add .SPACESHIP integer discovery, but in that case only if it is used as integer in PHI. That way targets can emit whatever is beneficial.