diff options
author | Richard Biener <rguenther@suse.de> | 2022-09-06 13:46:00 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-09-06 14:55:51 +0200 |
commit | 0a4a2667dc115ca73b552fcabf8570620dfbe55f (patch) | |
tree | 4f3cc335be7580f5327681165492257fa465d88d /gcc/tree-vectorizer.h | |
parent | 9e0c2696724d4d004ea189a69f15781c7baa68e1 (diff) | |
download | gcc-0a4a2667dc115ca73b552fcabf8570620dfbe55f.zip gcc-0a4a2667dc115ca73b552fcabf8570620dfbe55f.tar.gz gcc-0a4a2667dc115ca73b552fcabf8570620dfbe55f.tar.bz2 |
tree-optimization/106754 - fix compute_control_dep_chain defect
The following handles the situation of a loop exit along the
control path to the PHI def or from there to the use in a different
way, aoviding premature abort of the walks as noticed in the two
cases where the exit is outermost (gcc.dg/uninit-pred-11.c) or
wrapped in a condition that is on the path (gcc.dg/uninit-pred-12.c).
Instead of handling such exits during recursion we now pick them
up in the parent when walking post-dominators. That requires an
additional post-dominator walk at the outermost level which is
facilitated by splitting out the walk to a helper function and
the existing wrapper added earlier.
The patch also removes the bogus early exit from
uninit_analysis::init_use_preds, fixing a simplified version
of the PR106155 testcase.
PR tree-optimization/106754
* gimple-predicate-analysis.cc (compute_control_dep_chain_pdom):
New function, split out from compute_control_dep_chain. Handle
loop-exit like conditions here by pushing to the control vector.
(compute_control_dep_chain): Adjust and streamline dumping.
In the wrapper perform a post-dominator walk as well.
(uninit_analysis::init_use_preds): Remove premature early exit.
* gcc.dg/uninit-pred-12.c: New testcase.
* gcc.dg/uninit-pr106155-1.c: Likewise.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions