diff options
author | Roger Sayle <roger@nextmovesoftware.com> | 2020-06-24 18:48:43 +0000 |
---|---|---|
committer | Segher Boessenkool <segher@kernel.crashing.org> | 2020-06-24 19:27:56 +0000 |
commit | 35eca8c5e16933b5cdb17eac4ed51e6b3877b288 (patch) | |
tree | 5696a217e8b19df2d2fdd0b9c6cbe5bcd6244945 /gcc | |
parent | a16d0924f18046704ef9a4b6d9593718594677f1 (diff) | |
download | gcc-35eca8c5e16933b5cdb17eac4ed51e6b3877b288.zip gcc-35eca8c5e16933b5cdb17eac4ed51e6b3877b288.tar.gz gcc-35eca8c5e16933b5cdb17eac4ed51e6b3877b288.tar.bz2 |
simplify-rtx: Parity of parity is parity
2020-06-24 Roger Sayle <roger@nextmovesoftware.com>
* simplify-rtx.c (simplify_unary_operation_1): Simplify
(parity (parity x)) as (parity x), i.e. PARITY is idempotent.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/simplify-rtx.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |