https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101189
--- Comment #3 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:a0accaa99844b0c40661202635859f8c0be76cdd commit r12-1797-ga0accaa99844b0c40661202635859f8c0be76cdd Author: Andrew MacLeod <amacl...@redhat.com> Date: Thu Jun 24 13:35:21 2021 -0400 Only register relations on live edges Register a relation on a conditional edge only if the LHS supports this edge being taken. gcc/ PR tree-optimization/101189 * gimple-range-fold.cc (fold_using_range::range_of_range_op): Pass LHS range of condition to postfold routine. (fold_using_range::postfold_gcond_edges): Only process the TRUE or FALSE edge if the LHS range supports it being taken. * gimple-range-fold.h (postfold_gcond_edges): Add range parameter. gcc/testsuite/ * gcc.dg/tree-ssa/pr101189.c: New.