summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-23 10:47:34 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-23 10:47:34 +0000
commitc311b856b2cba0c426fdc646db8ae60a59f035c0 (patch)
tree82eb7f2396f54b578dc352f34d49acdd01bb3d25 /gcc/fold-const.c
parenta87365c70a434f981dcbe71d287d0197d99424f5 (diff)
downloadgcc-c311b856b2cba0c426fdc646db8ae60a59f035c0.tar.gz
Tweak uses of new API
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@209689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c5
1 files changed, 2 insertions, 3 deletions
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