]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/120817 - bogus DSE of .MASK_STORE
authorRichard Biener <rguenther@suse.de>
Mon, 7 Jul 2025 07:56:50 +0000 (09:56 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 7 Jul 2025 13:22:39 +0000 (15:22 +0200)
commit439b14e222571da76da2bfec04b9035fb9f1862d
tree77f716e6c68145376a6ca1fee2bb83ba90176c7d
parent65c40c0211f01579d1e7f259271cb79a8a19d533
tree-optimization/120817 - bogus DSE of .MASK_STORE

DSE used ao_ref_init_from_ptr_and_size for .MASK_STORE but
alias-analysis will use the specified size to disambiguate
against smaller objects.  For .MASK_STORE we instead have to
make the access size unspecified but we can still constrain
the access extent based on the maximum size possible.

PR tree-optimization/120817
* tree-ssa-dse.cc (initialize_ao_ref_for_dse): Use
ao_ref_init_from_ptr_and_range with unknown size for
.MASK_STORE and .MASK_LEN_STORE.

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