https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105629
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:d918faea1217596877a35c4946500399731fbbd3 commit r13-722-gd918faea1217596877a35c4946500399731fbbd3 Author: Richard Biener <rguent...@suse.de> Date: Mon May 23 11:41:50 2022 +0200 tree-optimization/105629 - spaceship recognition regression With the extra GENERIC folding we now do to (unsigned int) __v._M_value & 1 != (unsigned int) __v._M_value we end up with a sign-extending conversion to unsigned int rather than the sign-conversion to unsigned char we expect. Relaxing that fixes the regression. 2022-05-23 Richard Biener <rguent...@suse.de> PR tree-optimization/105629 * tree-ssa-phiopt.cc (spaceship_replacement): Allow a sign-extending conversion.