From c311b856b2cba0c426fdc646db8ae60a59f035c0 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Wed, 23 Apr 2014 10:47:34 +0000 Subject: Tweak uses of new API git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@209689 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fold-const.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/fold-const.c') diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 3a5237d0e5c..7ee0bce5a76 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4274,9 +4274,8 @@ build_range_check (location_t loc, tree type, tree exp, int in_p, if (integer_onep (low) && TREE_CODE (high) == INTEGER_CST) { int prec = TYPE_PRECISION (etype); - wide_int osb = wi::set_bit_in_zero (prec - 1, prec) - 1; - if (osb == high) + if (wi::mask (prec - 1, false, prec) == high) { if (TYPE_UNSIGNED (etype)) { @@ -12950,7 +12949,7 @@ fold_binary_loc (location_t loc, && operand_equal_p (tree_strip_nop_conversions (TREE_OPERAND (arg0, 1)), arg1, 0) - && wi::bit_and (TREE_OPERAND (arg0, 0), 1) == 1) + && wi::extract_uhwi (TREE_OPERAND (arg0, 0), 0, 1) == 1) { return omit_two_operands_loc (loc, type, code == NE_EXPR -- cgit v1.2.1