From: Roger Sayle <ro...@nextmovesoftware.com> 2020-06-24 Roger Sayle <ro...@nextmovesoftware.com>
* simplify-rtx.c (simplify_unary_operation_1): Simplify (parity (parity x)) as (parity x), i.e. PARITY is idempotent. --- gcc/simplify-rtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 28c2dc6..65008ea 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1391,6 +1391,10 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op) GET_MODE (XEXP (op, 0))); break; + case PARITY: + /* (parity (parity x)) -> parity (x). */ + return op; + default: break; } -- 1.8.3.1