tree-optimization/112766 - improve pruning of uninit diagnostics
Uninit diagnostics has code to prune based on incoming PHI args
that prove the uninit code is never executed. But that only
looks at the first found flag candidate while in the PRs case
only the second candidate would be the one to prune on. The
following patch makes us consider all of the flag candidates
which is cycles well spent IMHO.
PR tree-optimization/112766
* gimple-predicate-analysis.cc (find_var_cmp_const):
Support continuing the iteration and report every candidate.
(uninit_analysis::overlap): Iterate over all flag var
candidates.
* g++.dg/torture/uninit-pr112766.C: New testcase.