https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109192
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Macleod <amacl...@gcc.gnu.org>: https://gcc.gnu.org/g:0963cb5fde158cce986523a90fa9edc51c881f31 commit r13-6787-g0963cb5fde158cce986523a90fa9edc51c881f31 Author: Andrew MacLeod <amacl...@redhat.com> Date: Mon Mar 20 16:11:12 2023 -0400 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.