https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106112
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:983d87530d8efbae6b5f4973c52edd1071d26add commit r10-11035-g983d87530d8efbae6b5f4973c52edd1071d26add Author: Richard Biener <rguent...@suse.de> Date: Tue Jun 28 13:57:29 2022 +0200 tree-optimization/106112 - fix CSE from wider operation The following fixes a mistake in looking up an extended operand in the CSE of a truncated operation. 2022-06-28 Richard Biener <rguent...@suse.de> PR tree-optimization/106112 * tree-ssa-sccvn.c (valueized_wider_op): Properly extend a constant operand according to its type. * gcc.dg/torture/pr106112.c: New testcase. (cherry picked from commit 2dbb45d6dc0d20dc159b3d8e27ebb6825074827a)