aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2020-08-04 11:19:39 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 15:07:30 -0300
commit31e87475935488da07c6958bd902d95abb53bc18 (patch)
tree6f7d78007202022f70fe1b8645a02073126e7059
parent24f35c8714d4946c3e5f953f0019d54b8216ee21 (diff)
downloadgcc-31e87475935488da07c6958bd902d95abb53bc18.zip
gcc-31e87475935488da07c6958bd902d95abb53bc18.tar.gz
gcc-31e87475935488da07c6958bd902d95abb53bc18.tar.bz2
Add is_gimple_min_invariant dropped from previous patch.
gcc/ChangeLog: * vr-values.c (simplify_using_ranges::vrp_evaluate_conditional): Call is_gimple_min_invariant dropped from previous patch.
-rw-r--r--gcc/vr-values.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/vr-values.c b/gcc/vr-values.c
index 2fd4956..511342f 100644
--- a/gcc/vr-values.c
+++ b/gcc/vr-values.c
@@ -2495,7 +2495,9 @@ simplify_using_ranges::vrp_evaluate_conditional (tree_code code, tree op0,
tree type = TREE_TYPE (op0);
const value_range_equiv *vr0 = get_value_range (op0);
- if (vr0->varying_p () && INTEGRAL_TYPE_P (type))
+ if (vr0->varying_p ()
+ && INTEGRAL_TYPE_P (type)
+ && is_gimple_min_invariant (op1))
{
location_t location;