summaryrefslogtreecommitdiff
path: root/gcc/double-int.h
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-07-29 13:45:47 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-07-29 13:45:47 +0000
commit950f7f45269b7cb641b9f754b408980a01971ce2 (patch)
treeacaa4c3048af7730f61897ba56c531c20312e416 /gcc/double-int.h
parent8d0741923dc99b7876f8faafdc238b59a32d0ffc (diff)
double-int.h (double_int_and_not): New function.
2010-07-28 Richard Guenther <rguenther@suse.de> * double-int.h (double_int_and_not): New function. * combine.c (try_combine): Use it. * tree-vrp.c (simplify_bit_ops_using_ranges): Likewise. From-SVN: r162681
Diffstat (limited to 'gcc/double-int.h')
-rw-r--r--gcc/double-int.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/double-int.h b/gcc/double-int.h
index 00ec4efdad1..b14693d4fbd 100644
--- a/gcc/double-int.h
+++ b/gcc/double-int.h
@@ -158,7 +158,7 @@ static inline double_int
double_int_not (double_int a)
{
a.low = ~a.low;
- a.high = ~ a.high;
+ a.high = ~a.high;
return a;
}
@@ -182,6 +182,16 @@ double_int_and (double_int a, double_int b)
return a;
}
+/* Returns A & ~B. */
+
+static inline double_int
+double_int_and_not (double_int a, double_int b)
+{
+ a.low &= ~b.low;
+ a.high &= ~b.high;
+ return a;
+}
+
/* Returns A ^ B. */
static inline double_int