From: Roger Sayle Date: Wed, 24 Jun 2020 18:48:43 +0000 (+0000) Subject: simplify-rtx: Parity of parity is parity X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35eca8c5e16933b5cdb17eac4ed51e6b3877b288;p=gcc.git simplify-rtx: Parity of parity is parity 2020-06-24 Roger Sayle * simplify-rtx.c (simplify_unary_operation_1): Simplify (parity (parity x)) as (parity x), i.e. PARITY is idempotent. --- diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 28c2dc69ae7..65008eaab45 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; }