Call infer_non_null() directly when checking for non-null.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 28 Oct 2020 20:41:15 +0000 (16:41 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 29 Oct 2020 02:02:45 +0000 (22:02 -0400)
commit0162d00d12be24ee3f02ce876adafeaa91c6f7f9
tree6ba997f13de10d9e7e4e7ffc8189b5508ae94f89
parentc6bfc4eb3c961181912647781d7dd38057db655b
Call infer_non_null() directly when checking for non-null.

Simply call infer_non_null directly and avoid uneccessary checks of
the statement being modified.

gcc/
PR tree-optimization/97609
* gimple-range-cache.cc (non_null_ref::process_name): Call
infer_nonnull_range directly instead of infer_value_range.
gcc/testsuite/
* g++.dg/pr97609.C: New.
gcc/gimple-range-cache.cc
gcc/testsuite/g++.dg/pr97609.C [new file with mode: 0644]