]> git.ipfire.org Git - people/ms/gcc.git/commit
Terminate GORI calculations if a relation is not relevant.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 20 Mar 2023 20:11:12 +0000 (16:11 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Tue, 21 Mar 2023 13:56:02 +0000 (09:56 -0400)
commit0963cb5fde158cce986523a90fa9edc51c881f31
treef2fcf612cfc29038ed6a7196ce31eb05c80ab094
parent26adc870e3675591050f37edab46850b97a3c122
Terminate GORI calculations if a relation is not relevant.

We currently allow VARYING lhs GORI calculations to continue if there is
a relation present in the hope it will eventually better refine a result.
This adds a check that the relation is relevant to the outgoing range
calculation first.  If it is not relevant, stop calculating.

PR tree-optimization/109192
* gimple-range-gori.cc (gori_compute::compute_operand_range):
Terminate gori calculations if a relation is not relevant.
* value-relation.h (value_relation::set_relation): Allow
equality between op1 and op2 if they are the same.
gcc/gimple-range-gori.cc
gcc/value-relation.h