diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-11-15 14:52:23 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2013-11-15 14:52:23 +0000 |
commit | 6b58915bc37090e2fb91ce7ba94b0a6d6b733a49 (patch) | |
tree | 24a4005242502b69dc3f397ffbca92e36d73d175 /gcc/fold-const.c | |
parent | 11924f8b487dc3feb882f08b195bbcbfbacfd96d (diff) | |
download | gcc-6b58915bc37090e2fb91ce7ba94b0a6d6b733a49.zip gcc-6b58915bc37090e2fb91ce7ba94b0a6d6b733a49.tar.gz gcc-6b58915bc37090e2fb91ce7ba94b0a6d6b733a49.tar.bz2 |
dwarf2out.c (gen_enumeration_type_die): Remove unnecessary host_integerp test.
gcc/
* dwarf2out.c (gen_enumeration_type_die): Remove unnecessary
host_integerp test.
* tree-vect-patterns.c (vect_recog_divmod_pattern): Likewise.
Use TREE_INT_CST_LOW rather than tree_low_cst when reading the
constant.
* fold-const.c (fold_binary_loc): Replace a host_integerp/tree_low_cst
pair with a TREE_CODE test and TREE_INT_CST_LOW.
* tree-vect-generic.c (expand_vector_divmod): Likewise.
From-SVN: r204846
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index d08d0cd..87cde04 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -12033,16 +12033,15 @@ fold_binary_loc (location_t loc, if the new mask might be further optimized. */ if ((TREE_CODE (arg0) == LSHIFT_EXPR || TREE_CODE (arg0) == RSHIFT_EXPR) - && host_integerp (TREE_OPERAND (arg0, 1), 1) - && host_integerp (arg1, TYPE_UNSIGNED (TREE_TYPE (arg1))) - && tree_low_cst (TREE_OPERAND (arg0, 1), 1) - < TYPE_PRECISION (TREE_TYPE (arg0)) && TYPE_PRECISION (TREE_TYPE (arg0)) <= HOST_BITS_PER_WIDE_INT - && tree_low_cst (TREE_OPERAND (arg0, 1), 1) > 0) + && TREE_CODE (arg1) == INTEGER_CST + && host_integerp (TREE_OPERAND (arg0, 1), 1) + && tree_low_cst (TREE_OPERAND (arg0, 1), 1) > 0 + && (tree_low_cst (TREE_OPERAND (arg0, 1), 1) + < TYPE_PRECISION (TREE_TYPE (arg0)))) { unsigned int shiftc = tree_low_cst (TREE_OPERAND (arg0, 1), 1); - unsigned HOST_WIDE_INT mask - = tree_low_cst (arg1, TYPE_UNSIGNED (TREE_TYPE (arg1))); + unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (arg1); unsigned HOST_WIDE_INT newmask, zerobits = 0; tree shift_type = TREE_TYPE (arg0); |