From 76d6782207c44f95f77a185228ca7a1e15a9f615 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 22 Oct 2020 15:39:37 -0400 Subject: [PATCH] Use precision and sign to compare types for ranges Updated to only use range_compatible_p in range assert sanity checks, not for actual type cmpatibility. * gimple-range-gori.cc (is_gimple_logical_p): Use types_compatible_p for logical compatibility. (logical_stmt_cache::cacheable_p): Ditto. --- gcc/gimple-range-gori.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc index 983f4c97e87..5d50b111d2a 100644 --- a/gcc/gimple-range-gori.cc +++ b/gcc/gimple-range-gori.cc @@ -552,7 +552,7 @@ is_gimple_logical_p (const gimple *gs) case BIT_AND_EXPR: case BIT_IOR_EXPR: // Bitwise operations on single bits are logical too. - if (range_compatible_p (TREE_TYPE (gimple_assign_rhs1 (gs)), + if (types_compatible_p (TREE_TYPE (gimple_assign_rhs1 (gs)), boolean_type_node)) return true; break; @@ -1165,7 +1165,7 @@ bool logical_stmt_cache::cacheable_p (gimple *stmt, const irange *lhs_range) const { if (gimple_code (stmt) == GIMPLE_ASSIGN - && range_compatible_p (TREE_TYPE (gimple_assign_lhs (stmt)), + && types_compatible_p (TREE_TYPE (gimple_assign_lhs (stmt)), boolean_type_node) && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME) { -- 2.30.2