diff options
author | Jeff Law <law@redhat.com> | 2017-11-28 11:21:10 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2017-11-28 11:21:10 -0700 |
commit | 5e4a80e8a80584741b1e5dd73b936b15862e9171 (patch) | |
tree | 37c7440f9d1975696e190e877a50d4226e024b0c | |
parent | 196860441ef4bc4bf91de37a66c733dd49031be9 (diff) | |
download | gcc-5e4a80e8a80584741b1e5dd73b936b15862e9171.zip gcc-5e4a80e8a80584741b1e5dd73b936b15862e9171.tar.gz gcc-5e4a80e8a80584741b1e5dd73b936b15862e9171.tar.bz2 |
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to
refine ranges if scev_initialized_p returns true.
* vr-values.c (vr_values::extract_range_from_phi_node): Likewise.
From-SVN: r255211
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/gimple-ssa-evrp-analyze.c | 3 | ||||
-rw-r--r-- | gcc/vr-values.c | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca67485..cc548d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-11-28 Jeff Law <law@redhat.com> + + * gimple-ssa-evrp-analyze.c + (evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to + refine ranges if scev_initialized_p returns true. + * vr-values.c (vr_values::extract_range_from_phi_node): Likewise. + 2017-11-28 Julia Koval <julia.koval@intel.com> * config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16, diff --git a/gcc/gimple-ssa-evrp-analyze.c b/gcc/gimple-ssa-evrp-analyze.c index 6f225cb..551b1d6 100644 --- a/gcc/gimple-ssa-evrp-analyze.c +++ b/gcc/gimple-ssa-evrp-analyze.c @@ -246,7 +246,8 @@ evrp_range_analyzer::record_ranges_from_phis (basic_block bb) to use VARYING for them. But we can still resort to SCEV for loop header PHIs. */ struct loop *l; - if (interesting + if (scev_initialized_p () + && interesting && (l = loop_containing_stmt (phi)) && l->header == gimple_bb (phi)) vr_values->adjust_range_with_scev (&vr_result, l, phi, lhs); diff --git a/gcc/vr-values.c b/gcc/vr-values.c index 0150f59..9352e12 100644 --- a/gcc/vr-values.c +++ b/gcc/vr-values.c @@ -2935,7 +2935,8 @@ scev_check: scev_check can be reached from two paths, one is a fall through from above "varying" label, the other is direct goto from code block which tries to avoid infinite simulation. */ - if ((l = loop_containing_stmt (phi)) + if (scev_initialized_p () + && (l = loop_containing_stmt (phi)) && l->header == gimple_bb (phi)) adjust_range_with_scev (vr_result, l, phi, lhs); |