]> 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 <rguenther@suse.de>
Fri, 31 Oct 2025 13:54:16 +0000 (14:54 +0100)
commit4216bf468c68aacfa29a11296af9ba9967756bed
tree6008c2df55f6145b09d57ab7713954f6c27d39f8
parentedfa8e4567aef166af7e0098dbf9e209e852f90a
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.

(cherry picked from commit 439b14e222571da76da2bfec04b9035fb9f1862d)
gcc/testsuite/gcc.dg/vect/pr120817.c [new file with mode: 0644]
gcc/tree-ssa-dse.cc