https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104526
--- Comment #4 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:e15425e899e4a9eec768cf74aaf36cdbf1d29913 commit r12-7253-ge15425e899e4a9eec768cf74aaf36cdbf1d29913 Author: Andrew MacLeod <amacl...@redhat.com> Date: Mon Feb 14 19:43:40 2022 -0500 Use GORI to evaluate arguments of a COND_EXPR. Provide an API into gori to perform a basic evaluation of the arguments of a COND_EXPR if they are in the dependency chain of the condition. PR tree-optimization/104526 gcc/ * gimple-range-fold.cc (fold_using_range::range_of_cond_expr): Call new routine. * gimple-range-gori.cc (range_def_chain::get_def_chain): Force a build of dependency chain if there isn't one. (gori_compute::condexpr_adjust): New. * gimple-range-gori.h (class gori_compute): New prototype. gcc/testsuite/ * gcc.dg/pr104526.c: New.