]> gcc.gnu.org Git - gcc.git/commit
Teach VN about masked/len stores
authorRichard Biener <rguenther@suse.de>
Wed, 20 Jul 2022 10:28:26 +0000 (12:28 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 21 Jul 2022 11:05:42 +0000 (13:05 +0200)
commitbd9837bc3ca1344c32aef7ba9f8fa1785063132e
tree37e494bdc17a57e16af86c4d491cb9cbb40ab691
parentf4ed610d02aaf8cfcdcb5cf03e0cde65f1f5f890
Teach VN about masked/len stores

The following teaches VN to handle reads from .MASK_STORE and
.LEN_STORE.  For this push_partial_def is extended first for
convenience so we don't have to handle the full def case in the
caller (possibly other paths can be simplified then).  Also
the partial definition stored value can have an offset applied
so we don't have to build a fake RHS when we register the pieces
of an existing store.

PR tree-optimization/106365
* tree-ssa-sccvn.cc (pd_data::rhs_off): New field determining
the offset to start encoding of RHS from.
(vn_walk_cb_data::vn_walk_cb_data): Initialize it.
(vn_walk_cb_data::push_partial_def): Allow the first partial
definition to be fully providing the def.  Offset RHS
before encoding if requested.
(vn_reference_lookup_3): Initialize def_rhs everywhere.
Add support for .MASK_STORE and .LEN_STORE (partial) definitions.

* gcc.target/i386/vec-maskstore-vn.c: New testcase.
gcc/testsuite/gcc.target/i386/vec-maskstore-vn.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.cc
This page took 0.068029 seconds and 5 git commands to generate.