tree-optimization/93354 FRE redundant store removal validity fix
authorRichard Biener <rguenther@suse.de>
Thu, 23 Jan 2020 11:43:26 +0000 (12:43 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 23 Jan 2020 11:46:39 +0000 (12:46 +0100)
commitf5ee5d05f367d6221b76f7a3ef7dad96605dbf04
treef925dbaaeff662eeffb4dbf2e9223d46315269d1
parent9592f639ff4655203f1cffb7c6752696e2721fb0
tree-optimization/93354 FRE redundant store removal validity fix

This fixes tracking of the alias-set of partial defs for use by
redundant store removal.

2020-01-23  Richard Biener  <rguenther@suse.de>

PR tree-optimization/93381
* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Take
alias-set of the def as argument and record the first one.
(vn_walk_cb_data::first_set): New member.
(vn_reference_lookup_3): Pass the alias-set of the current def
to push_partial_def.  Fix alias-set used in the aggregate copy
case.
(vn_reference_lookup): Consistently set *last_vuse_ptr.
* real.c (clear_significand_below): Fix out-of-bound access.

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