From fc0af537a184ec4ffc26c5516f7a978c38c4b0ab Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 27 Jun 2022 20:50:03 +0200 Subject: [PATCH] Allow all types supported by ranger in loop-ch. This converts the ranger use in loop-ch to allow any types allowed by the ranger infrastructure. As per the documentation for class vrange, the way to query this is with Value_Range::supports_type_p(). Since the range of a GIMPLE_COND is always an integer, no further changes to loop-ch are necessary because its only temporary is already an int_range (otherwise, we'd need to use Value_Range with the appropriate type). gcc/ChangeLog: * tree-ssa-loop-ch.cc (entry_loop_condition_is_static): Use Value_Range::supports_type_p instead of irange::supports_p. --- gcc/tree-ssa-loop-ch.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc index 26d96c0c21a..1cc38f3b889 100644 --- a/gcc/tree-ssa-loop-ch.cc +++ b/gcc/tree-ssa-loop-ch.cc @@ -55,7 +55,7 @@ entry_loop_condition_is_static (class loop *l, path_range_query *query) gcond *last = safe_dyn_cast (last_stmt (e->dest)); if (!last - || !irange::supports_p (TREE_TYPE (gimple_cond_lhs (last)))) + || !Value_Range::supports_type_p (TREE_TYPE (gimple_cond_lhs (last)))) return false; edge true_e, false_e; -- 2.36.1