https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106414
--- Comment #7 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:613e3b86955ea3b4977490625328708e82bea6fa commit r13-1822-g613e3b86955ea3b4977490625328708e82bea6fa Author: Richard Biener <rguent...@suse.de> Date: Mon Jul 25 12:10:48 2022 +0200 middle-end/106414 - fix mistake in ~(x ^ y) -> x == y pattern When compares are integer typed the inversion with ~ isn't properly preserved by the equality comparison even when converting the result properly. The following fixes this by restricting the input precisions accordingly. PR middle-end/106414 * match.pd (~(x ^ y) -> x == y): Restrict to single bit precision types. * gcc.dg/torture/pr106414-1.c: New testcase. * gcc.dg/torture/pr106414-2.c: Likewise.