aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 5c9f6f42140..7ce14c93663 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1675,13 +1675,8 @@ build_low_bits_mask (tree type, unsigned bits)
bool
cst_and_fits_in_hwi (const_tree x)
{
- if (TREE_CODE (x) != INTEGER_CST)
- return false;
-
- if (TYPE_PRECISION (TREE_TYPE (x)) > HOST_BITS_PER_WIDE_INT)
- return false;
-
- return TREE_INT_CST_NUNITS (x) == 1;
+ return (TREE_CODE (x) == INTEGER_CST
+ && (tree_fits_shwi_p (x) || tree_fits_uhwi_p (x)));
}
/* Build a newly constructed VECTOR_CST node of length LEN. */