tree-optimization/100053 - fix predication in VN
This avoids doing optimistic dominance queries involving
non-executable backedges when validating recorded predicated values
in VN because we have no way to force re-evaluating validity when
optimistically not executable edges become executable later.
2021-04-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/100053
* tree-ssa-sccvn.c (vn_nary_op_get_predicated_value): Do
not use optimistic dominance queries for backedges to validate
predicated values.
(dominated_by_p_w_unex): Add parameter to ignore executable
state on backedges.
(rpo_elim::eliminate_avail): Adjust.
* gcc.dg/torture/pr100053.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-93.c: Likewise.
(cherry picked from commit
f9810422f6768b914aabfcbffe64f535bdd18452)