]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add is_gimple_min_invariant dropped from previous patch.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 4 Aug 2020 09:19:39 +0000 (11:19 +0200)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 18:07:30 +0000 (15:07 -0300)
gcc/ChangeLog:

* vr-values.c (simplify_using_ranges::vrp_evaluate_conditional):
Call is_gimple_min_invariant dropped from previous patch.

gcc/vr-values.c

index 2fd4956a2e4cae9ccae988ddb4b7d867a4d87f4c..511342f2f132124e260d03e3ff4301c398f98bc7 100644 (file)
@@ -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;