Allow more precision when querying from fold_const.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 12 Jan 2022 18:31:08 +0000 (13:31 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 13 Jan 2022 18:51:30 +0000 (13:51 -0500)
commit49d5fb4feee831868d80fff4d024c271911c92ca
tree3ddef029955525380150636e13c8fb8252fb8e8f
parent27e4260166950b784fe270ba4f0cae9a66faf1c4
Allow more precision when querying from fold_const.

fold_const::expr_not_equal_to queries for a current range, but still uses
the old value_range class.  This is causing it to miss opportunities when
ranger can provide something better.

PR tree-optimization/83072
PR tree-optimization/83073
PR tree-optimization/97909
gcc/
* fold-const.c (expr_not_equal_to): Use a multi-range class.

gcc/testsuite/
* gcc.dg/pr83072-2.c: New.
* gcc.dg/pr83073.c: New.
gcc/fold-const.c
gcc/testsuite/gcc.dg/pr83072-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr83073.c [new file with mode: 0644]