From bdfac905dab78abf4ae4d652919fefc3b669eb52 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 12 Nov 2018 11:16:36 +0000 Subject: [PATCH] tree-vrp.c (set_value_range_to_nonnull): Clear equiv. 2018-11-12 Richard Biener * tree-vrp.c (set_value_range_to_nonnull): Clear equiv. (set_value_range_to_null): Likewise. * vr-values.c (vr_values::extract_range_from_comparison): Clear equiv for constant singleton ranges. From-SVN: r266027 --- gcc/ChangeLog | 7 +++++++ gcc/tree-vrp.c | 4 ++-- gcc/vr-values.c | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b12964f6d20..ecfd6aa7fe5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-11-12 Richard Biener + + * tree-vrp.c (set_value_range_to_nonnull): Clear equiv. + (set_value_range_to_null): Likewise. + * vr-values.c (vr_values::extract_range_from_comparison): + Clear equiv for constant singleton ranges. + 2018-11-12 Wei Xiao * config/i386/sse.md: Combine VFIXUPIMM* patterns diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 3ef676bb71b..4b3234075f4 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -767,7 +767,7 @@ void set_value_range_to_nonnull (value_range *vr, tree type) { tree zero = build_int_cst (type, 0); - vr->update (VR_ANTI_RANGE, zero, zero); + set_value_range (vr, VR_ANTI_RANGE, zero, zero, NULL); } @@ -776,7 +776,7 @@ set_value_range_to_nonnull (value_range *vr, tree type) void set_value_range_to_null (value_range *vr, tree type) { - set_value_range_to_value (vr, build_int_cst (type, 0), vr->equiv ()); + set_value_range_to_value (vr, build_int_cst (type, 0), NULL); } /* Return true, if VAL1 and VAL2 are equal values for VRP purposes. */ diff --git a/gcc/vr-values.c b/gcc/vr-values.c index 4edc5a467ee..dc8a071aafc 100644 --- a/gcc/vr-values.c +++ b/gcc/vr-values.c @@ -896,7 +896,7 @@ vr_values::extract_range_from_comparison (value_range *vr, enum tree_code code, type. */ val = fold_convert (type, val); if (is_gimple_min_invariant (val)) - set_value_range_to_value (vr, val, vr->equiv ()); + set_value_range_to_value (vr, val, NULL); else vr->update (VR_RANGE, val, val); } @@ -1672,7 +1672,7 @@ vr_values::adjust_range_with_scev (value_range *vr, struct loop *loop, /* Like in PR19590, scev can return a constant function. */ if (is_gimple_min_invariant (chrec)) { - set_value_range_to_value (vr, chrec, vr->equiv ()); + set_value_range_to_value (vr, chrec, NULL); return; } -- 2.30.2