diff options
author | Richard Biener <rguenther@suse.de> | 2022-12-11 12:32:49 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-12-11 14:45:30 +0100 |
commit | 26295a069fd312a8be4a6cd96643117383145cc0 (patch) | |
tree | 1a9da2a4bef72422499665558a335bb6b9fd3791 /libphobos/src/std/algorithm/searching.d | |
parent | f8d136e50e6f82cba793483d910a2b2643108508 (diff) | |
download | gcc-26295a069fd312a8be4a6cd96643117383145cc0.zip gcc-26295a069fd312a8be4a6cd96643117383145cc0.tar.gz gcc-26295a069fd312a8be4a6cd96643117383145cc0.tar.bz2 |
Treat ADDR_EXPR and CONSTRUCTOR as GIMPLE/GENERIC magically
The following allows to match ADDR_EXPR for both the invariant
&a.b case as well as the &p->d case in a separate definition
transparently. This also allows to remove the hack we employ
for CONSTRUCTOR which we handle for example with
(match vec_same_elem_p
CONSTRUCTOR@0
(if (TREE_CODE (@0) == SSA_NAME
&& uniform_vector_p (gimple_assign_rhs1 (SSA_NAME_DEF_STMT (@0))))))
Note CONSTUCTORs always appear as separate definition in GIMPLE,
but I continue to play safe and ADDR_EXPRs are now matched in
both places where previously ADDR_EXPR@0 would have missed
the &p->x case.
This is a prerequesite for the PR89317 fix.
* genmatch.cc (dt_node::gen_kids): Handle ADDR_EXPR in both
the GENERIC and GIMPLE op position.
(dt_simplify::gen): Capture both GENERIC and GIMPLE op
position for ADDR_EXPR and CONSTRUCTOR.
* match.pd: Simplify CONSTRUCTOR leaf handling.
* gcc.dg/tree-ssa/forwprop-3.c: Adjust.
* g++.dg/tree-ssa/pr31146-2.C: Likewise.
Diffstat (limited to 'libphobos/src/std/algorithm/searching.d')
0 files changed, 0 insertions, 0 deletions