Commit ed6f90f7 by Josef Zlomek Committed by Josef Zlomek

fold-const.c (fold): Fix bug in (A & C) == D where D & ~C != 0 and similarly in…

fold-const.c (fold): Fix bug in (A & C) == D where D & ~C != 0 and similarly in (A | C) == D where C...

	* fold-const.c (fold): Fix bug in (A & C) == D where D & ~C != 0
	and similarly in (A | C) == D where C & ~D != 0.

From-SVN: r70637
parent 01bf0f3e
2003-08-21 Josef Zlomek <zlomekj@suse.cz>
* fold-const.c (fold): Fix bug in (A & C) == D where D & ~C != 0
and similarly in (A | C) == D where C & ~D != 0.
2003-08-20 Geoffrey Keating <geoffk@apple.com>
PR 8180
......
......@@ -7397,7 +7397,7 @@ fold (tree expr)
tree dandnotc = fold (build (BIT_ANDTC_EXPR, TREE_TYPE (arg0),
arg1, TREE_OPERAND (arg0, 1)));
tree rslt = code == EQ_EXPR ? integer_zero_node : integer_one_node;
if (!integer_zerop (dandnotc))
if (integer_nonzerop (dandnotc))
return omit_one_operand (type, rslt, arg0);
}
......@@ -7411,7 +7411,7 @@ fold (tree expr)
tree candnotd = fold (build (BIT_ANDTC_EXPR, TREE_TYPE (arg0),
TREE_OPERAND (arg0, 1), arg1));
tree rslt = code == EQ_EXPR ? integer_zero_node : integer_one_node;
if (!integer_zerop (candnotd))
if (integer_nonzerop (candnotd))
return omit_one_operand (type, rslt, arg0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment