Pass multi-range from range_query::value_* routines
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 5 Nov 2020 18:59:45 +0000 (13:59 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 5 Nov 2020 20:26:49 +0000 (15:26 -0500)
commit22984f3f090921b5ac80ec0057f6754ec458e97e
tree02c1c6045d4f6a5235b1b589932c87069da77fcd
parentd16d45655d77d58e3f8430b9cf386b04759e01c7
Pass multi-range from range_query::value_*  routines

fix range-ops equal/not_equal to not reuse the result range as intermediary.
value_query::value routines should pasa multi-range in as some other rangeop
routines build into this result, so we may need better precision.

gcc/
PR tree-optimization/97725
* range-op.cc (operator_equal::fold_range): Use new tmp value.
(operator_not_equal::fold_range): Ditto.
* value-query.cc (range_query::value_of_expr): Use int_range_max
not a value_range.
(range_query::value_on_edge): Ditto.
(range_query::value_of_stmt): Ditto.
gcc/testsuite/
* gcc.dg/pr97725.c: New.
gcc/range-op.cc
gcc/testsuite/gcc.dg/pr97725.c [new file with mode: 0644]
gcc/value-query.cc