diff options
| author | Kazu Hirata <kazu@cs.umass.edu> | 2003-02-14 17:50:30 +0000 |
|---|---|---|
| committer | Kazu Hirata <kazu@gcc.gnu.org> | 2003-02-14 17:50:30 +0000 |
| commit | 6017c7192b72a44f762521140f270ae91060c2f8 (patch) | |
| tree | a68ee3f29bb4d7d981224b90d9c08e4f68d48a8a /gcc/simplify-rtx.c | |
| parent | b8c86c6d07a8c404a696d908b0734af9493c0884 (diff) | |
| download | gcc-6017c7192b72a44f762521140f270ae91060c2f8.zip gcc-6017c7192b72a44f762521140f270ae91060c2f8.tar.gz gcc-6017c7192b72a44f762521140f270ae91060c2f8.tar.bz2 | |
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
Diffstat (limited to 'gcc/simplify-rtx.c')
| -rw-r--r-- | gcc/simplify-rtx.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index e874c2a..9d3b213 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1338,11 +1338,17 @@ simplify_binary_operation (code, mode, op0, op1) if (GET_CODE (op1) == AND) { 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))) - 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; |
