diff options
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4e1c9a1..f41ea38 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -6648,10 +6648,10 @@ fold_single_bit_test (location_t loc, enum tree_code code, && TREE_CODE (TREE_OPERAND (inner, 1)) == INTEGER_CST && tree_fits_uhwi_p (TREE_OPERAND (inner, 1)) && bitnum < TYPE_PRECISION (type) - && (TREE_INT_CST_LOW (TREE_OPERAND (inner, 1)) + && (tree_to_uhwi (TREE_OPERAND (inner, 1)) < (unsigned) (TYPE_PRECISION (type) - bitnum))) { - bitnum += TREE_INT_CST_LOW (TREE_OPERAND (inner, 1)); + bitnum += tree_to_uhwi (TREE_OPERAND (inner, 1)); inner = TREE_OPERAND (inner, 0); } @@ -7264,8 +7264,8 @@ fold_plusminus_mult_expr (location_t loc, enum tree_code code, tree type, HOST_WIDE_INT int01, int11, tmp; bool swap = false; tree maybe_same; - int01 = TREE_INT_CST_LOW (arg01); - int11 = TREE_INT_CST_LOW (arg11); + int01 = tree_to_shwi (arg01); + int11 = tree_to_shwi (arg11); /* Move min of absolute values to int11. */ if (absu_hwi (int01) < absu_hwi (int11)) @@ -12019,7 +12019,7 @@ fold_binary_loc (location_t loc, if (POINTER_TYPE_P (TREE_TYPE (arg0)) && tree_fits_uhwi_p (arg1)) { unsigned HOST_WIDE_INT modulus, residue; - unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1); + unsigned HOST_WIDE_INT low = tree_to_uhwi (arg1); modulus = get_pointer_modulus_and_residue (arg0, &residue, integer_onep (arg1)); @@ -12650,12 +12650,12 @@ fold_binary_loc (location_t loc, /* Turn (a OP c1) OP c2 into a OP (c1+c2). */ if (TREE_CODE (op0) == code && tree_fits_uhwi_p (arg1) - && TREE_INT_CST_LOW (arg1) < prec + && tree_to_uhwi (arg1) < prec && tree_fits_uhwi_p (TREE_OPERAND (arg0, 1)) - && TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1)) < prec) + && tree_to_uhwi (TREE_OPERAND (arg0, 1)) < prec) { - unsigned int low = (TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1)) - + TREE_INT_CST_LOW (arg1)); + unsigned int low = (tree_to_uhwi (TREE_OPERAND (arg0, 1)) + + tree_to_uhwi (arg1)); /* Deal with a OP (c1 + c2) being undefined but (a OP c1) OP c2 being well defined. */ |