aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-08-02 12:14:22 +0200
committerAldy Hernandez <aldyh@redhat.com>2022-08-02 14:50:25 +0200
commite9f5b4fa4f2c93ef76e3766b3edabfaebc100741 (patch)
treef3022a8ae5525ddebf8f2ab1c19eafdd832cec6f
parent5e4f26441bdc89e95f0c257bc6649eed0142b939 (diff)
downloadgcc-e9f5b4fa4f2c93ef76e3766b3edabfaebc100741.zip
gcc-e9f5b4fa4f2c93ef76e3766b3edabfaebc100741.tar.gz
gcc-e9f5b4fa4f2c93ef76e3766b3edabfaebc100741.tar.bz2
Limit ranger query in ipa-prop.cc to integrals.
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.
-rw-r--r--gcc/ipa-prop.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc
index fb8f973..ca5b9f3 100644
--- a/gcc/ipa-prop.cc
+++ b/gcc/ipa-prop.cc
@@ -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 ())
{