]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Limit ranger query in ipa-prop.cc to integrals.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 2 Aug 2022 10:14:22 +0000 (12:14 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 2 Aug 2022 12:50:25 +0000 (14:50 +0200)
ipa-* still works on legacy value_range's which only support
integrals.  This patch limits the query to integrals, as to not get a
floating point range that can't exist in an irange.

gcc/ChangeLog:

* ipa-prop.cc (ipa_compute_jump_functions_for_edge): Limit ranger
query to integrals.

gcc/ipa-prop.cc

index fb8f97397dc40292a68a3a810f19b0c81850e616..ca5b9f3157082aaaa1f294744e275132b23a1ab2 100644 (file)
@@ -2303,6 +2303,10 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi,
        {
          if (TREE_CODE (arg) == SSA_NAME
              && param_type
+             /* Limit the ranger query to integral types as the rest
+                of this file uses value_range's, which only hold
+                integers and pointers.  */
+             && irange::supports_p (TREE_TYPE (arg))
              && get_range_query (cfun)->range_of_expr (vr, arg)
              && !vr.undefined_p ())
            {