Ranger cache dominator queries should ignore backedges.
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 23 Mar 2023 14:28:34 +0000 (10:28 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 24 Mar 2023 13:11:09 +0000 (09:11 -0400)
commit0409aa5a2de9ce3164933814a4a7adc91f6acb96
tree0cd410bc9183c6ceaaccf083f61c04d7b60fd52f
parented626f18b189920aeed9974aded3f9cb6f25b543
Ranger cache dominator queries should ignore backedges.

When querying dominators for cache values, ignore back edges in
read-only mode.

PR tree-optimization/109238
gcc/
* gimple-range-cache.cc (ranger_cache::resolve_dom): Ignore
predecessors which this block dominates.

gcc/testsuite/
* gcc.dg/pr109238.c: New.
gcc/gimple-range-cache.cc
gcc/testsuite/gcc.dg/pr109238.c [new file with mode: 0644]