re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)
authorRichard Biener <rguenther@suse.de>
Fri, 11 Oct 2019 13:10:15 +0000 (13:10 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 11 Oct 2019 13:10:15 +0000 (13:10 +0000)
commit1284e2b104a81ad93daab5110cd844981e501086
treed773f6808cd52e7a7ccf0619e48f94f89c3e7c28
parente5207f1a6528877713109dc59b8db6c62a6eca28
re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)

2019-10-11  Richard Biener  <rguenther@suse.de>

PR tree-optimization/90883
PR tree-optimization/91091
* tree-ssa-sccvn.c (vn_reference_lookup_3): Use correct
alias-sets both for recording VN table entries and continuing
walking after translating through copies.  Handle same-sized
reads from SSA names by returning the plain SSA name.
(eliminate_dom_walker::eliminate_stmt): Properly handle
non-size precision stores in redundant store elimination.

* gcc.dg/torture/20191011-1.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-82.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-83.c: Likewise.
* gcc.dg/tree-ssa/redundant-assign-zero-1.c: Disable FRE.
* gcc.dg/tree-ssa/redundant-assign-zero-2.c: Likewise.

From-SVN: r276882
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/20191011-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/redundant-assign-zero-1.c
gcc/testsuite/gcc.dg/tree-ssa/redundant-assign-zero-2.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-82.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-83.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.c