Commit 6017c719 by Kazu Hirata Committed by Kazu Hirata

simplify-rtx.c (simplify_binary_operation): Simplify ~y when (x - (x & y)) is found.

	* simplify-rtx.c (simplify_binary_operation): Simplify ~y when
	(x - (x & y)) is found.

From-SVN: r62906
parent b8c86c6d
2003-02-14 Kazu Hirata <kazu@cs.umass.edu>
* simplify-rtx.c (simplify_binary_operation): Simplify ~y when
(x - (x & y)) is found.
2003-02-14 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 2003-02-14 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.in: Fix typo. * configure.in: Fix typo.
......
...@@ -1338,11 +1338,17 @@ simplify_binary_operation (code, mode, op0, op1) ...@@ -1338,11 +1338,17 @@ simplify_binary_operation (code, mode, op0, op1)
if (GET_CODE (op1) == AND) if (GET_CODE (op1) == AND)
{ {
if (rtx_equal_p (op0, XEXP (op1, 0))) if (rtx_equal_p (op0, XEXP (op1, 0)))
return simplify_gen_binary (AND, mode, op0, {
gen_rtx_NOT (mode, XEXP (op1, 1))); tem = simplify_gen_unary (NOT, mode, XEXP (op1, 1),
GET_MODE (XEXP (op1, 1)));
return simplify_gen_binary (AND, mode, op0, tem);
}
if (rtx_equal_p (op0, XEXP (op1, 1))) if (rtx_equal_p (op0, XEXP (op1, 1)))
return simplify_gen_binary (AND, mode, op0, {
gen_rtx_NOT (mode, XEXP (op1, 0))); tem = simplify_gen_unary (NOT, mode, XEXP (op1, 0),
GET_MODE (XEXP (op1, 0)));
return simplify_gen_binary (AND, mode, op0, tem);
}
} }
break; break;
......
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