Only call vrp_visit_cond_stmt if range_of_stmt doesn't resolve to a const.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 19 Jul 2021 18:02:57 +0000 (14:02 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 22 Jul 2021 12:51:59 +0000 (08:51 -0400)
commite58093276a6e319c2a6d9f02e343fbf8400dab60
tree0eea3cdb0858c34d8b035492f47977a5563f74fd
parenta6291d88d5b6c17d41950e21d7d452f7f0f73020
Only call vrp_visit_cond_stmt if range_of_stmt doesn't resolve to a const.

Eevntually all functionality will be subsumed.  Until then, call it only
if needed.

gcc/
PR tree-optimization/101496
* vr-values.c (simplify_using_ranges::fold_cond): Call range_of_stmt
first, then vrp_visit_cond_Stmt.

gcc/testsuite
* gcc.dg/pr101496.c: New.
gcc/testsuite/gcc.dg/pr101496.c [new file with mode: 0644]
gcc/vr-values.c