Set ranges from unreachable edges for all known ranges.
In the conversion of DOM+evrp to DOM+ranger, we missed that evrp was
exporting ranges for unreachable edges for all SSA names for which we
have ranges for. Instead we have only been exporting ranges for the
SSA name in the final conditional to the BB involving the unreachable
edge.
This patch adjusts adjusts DOM to iterate over the exports, similarly
to what evrp was doing.
Note that I also noticed that we don't calculate the nonzero bit mask
for op1, when 0 = op1 & MASK. This isn't needed for this PR,
since maybe_set_nonzero_bits() is chasing the definition and
parsing the bitwise and on its own. However, I'll be adding the
functionality for completeness sake, plus we could probably drop the
maybe_set_nonzero_bits legacy call entirely.
PR tree-optimization/107009
gcc/ChangeLog:
* tree-ssa-dom.cc
(dom_opt_dom_walker::set_global_ranges_from_unreachable_edges):
Iterate over exports.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr107009.c: New test.