]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/118895 - ICE during PRE
authorRichard Biener <rguenther@suse.de>
Mon, 17 Feb 2025 10:40:01 +0000 (11:40 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 17 Feb 2025 13:41:25 +0000 (14:41 +0100)
commitdfd0ced98fcf62c4d24979b74c1d52334ff62bfc
treeb69eadd3c48d54da47fa316559f13333a3b30c83
parent230678c19cb5e2f8a4855b9790794042fc6ad068
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.
gcc/testsuite/gcc.dg/pr118895.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.cc