]> git.ipfire.org Git - people/ms/gcc.git/commit
tree-optimization/108387 - ICE with VN handling of x << C as x * (1<<C)
authorRichard Biener <rguenther@suse.de>
Fri, 13 Jan 2023 07:37:24 +0000 (08:37 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 13 Jan 2023 08:40:01 +0000 (09:40 +0100)
commitadbee4a197c7b735a3dd58cfac8933f70069f71d
tree5c1fd064ecb4c68a6ba19092c0ba28e26ccef744
parent9b6c624820050cd5e11b2fbd9c997f94b691295a
tree-optimization/108387 - ICE with VN handling of x << C as x * (1<<C)

The following fixes unexpected simplification of x << C as
x * (1<<C) to a constant.

PR tree-optimization/108387
* tree-ssa-sccvn.cc (visit_nary_op): Check for SSA_NAME
value before inserting expression into the tables.

* gcc.dg/pr108387.c: New testcase.
gcc/testsuite/gcc.dg/pr108387.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.cc