https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118895
--- Comment #4 from GCC 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:dfd0ced98fcf62c4d24979b74c1d52334ff62bfc commit r15-7589-gdfd0ced98fcf62c4d24979b74c1d52334ff62bfc Author: Richard Biener <rguent...@suse.de> Date: Mon Feb 17 11:40:01 2025 +0100 tree-optimization/118895 - ICE during PRE When we simplify a NARY during PHI translation we have to make sure to not inject not available operands into it given that might violate the valueization hook constraints and we'd pick up invalid context-sensitive data in further simplification or as in this case later ICE when we try to insert the expression. PR tree-optimization/118895 * tree-ssa-sccvn.cc (vn_nary_build_or_lookup_1): Only allow CSE if we can verify the result is available. * gcc.dg/pr118895.c: New testcase.