+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.
+
2010-07-29 Bernd Schmidt <bernds@codesourcery.com>
PR rtl-optimization/42575
i = double_int_and (i, m);
m = double_int_lshift (m, offset, HOST_BITS_PER_DOUBLE_INT, false);
i = double_int_lshift (i, offset, HOST_BITS_PER_DOUBLE_INT, false);
- o = double_int_ior (double_int_and (o, double_int_not (m)), i);
+ o = double_int_ior (double_int_and_not (o, m), i);
combine_merges++;
subst_insn = i3;
double_int_not (double_int a)
{
a.low = ~a.low;
- a.high = ~ a.high;
+ a.high = ~a.high;
return a;
}
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
switch (gimple_assign_rhs_code (stmt))
{
case BIT_AND_EXPR:
- mask = double_int_and (may_be_nonzero0,
- double_int_not (must_be_nonzero1));
+ mask = double_int_and_not (may_be_nonzero0, must_be_nonzero1);
if (double_int_zero_p (mask))
{
op = op0;
break;
}
- mask = double_int_and (may_be_nonzero1,
- double_int_not (must_be_nonzero0));
+ mask = double_int_and_not (may_be_nonzero1, must_be_nonzero0);
if (double_int_zero_p (mask))
{
op = op1;
}
break;
case BIT_IOR_EXPR:
- mask = double_int_and (may_be_nonzero0,
- double_int_not (must_be_nonzero1));
+ mask = double_int_and_not (may_be_nonzero0, must_be_nonzero1);
if (double_int_zero_p (mask))
{
op = op1;
break;
}
- mask = double_int_and (may_be_nonzero1,
- double_int_not (must_be_nonzero0));
+ mask = double_int_and_not (may_be_nonzero1, must_be_nonzero0);
if (double_int_zero_p (mask))
{
op = op0;