]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/106131 - wrong code with FRE rewriting
authorRichard Biener <rguenther@suse.de>
Thu, 30 Jun 2022 08:33:40 +0000 (10:33 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 14 Oct 2022 10:47:13 +0000 (12:47 +0200)
commita8abbf6d15fefe5ac27aa7c21201883b66cc9b01
tree5e6b75c6b66db50e9d46b302f8f21199eded91e6
parent983d87530d8efbae6b5f4973c52edd1071d26add
tree-optimization/106131 - wrong code with FRE rewriting

The following makes sure to not use the original TBAA type for
looking up a value across an aggregate copy when we had to offset
the read.

2022-06-30  Richard Biener  <rguenther@suse.de>

PR tree-optimization/106131
* tree-ssa-sccvn.c (vn_reference_lookup_3): Force alias-set
zero when offsetting the read looking through an aggregate
copy.

* g++.dg/torture/pr106131.C: New testcase.

(cherry picked from commit 9701432ff79926a5dd3303be3417e0bd0c24140b)
gcc/testsuite/g++.dg/torture/pr106131.C [new file with mode: 0644]
gcc/tree-ssa-sccvn.c