]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/106112 - fix CSE from wider operation
authorRichard Biener <rguenther@suse.de>
Tue, 28 Jun 2022 11:57:29 +0000 (13:57 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 29 Jun 2022 09:14:34 +0000 (11:14 +0200)
commit2dbb45d6dc0d20dc159b3d8e27ebb6825074827a
tree82f023984c8fc3b5a8276eb1f53188b44772101d
parentd42c1598e52ec0a33fbcc4efa39f4c299d09a3fc
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  <rguenther@suse.de>

PR tree-optimization/106112
* tree-ssa-sccvn.cc (valueized_wider_op): Properly extend
a constant operand according to its type.

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