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.
This commit is contained in:
Roger Sayle 2020-06-24 18:48:43 +00:00 committed by Segher Boessenkool
parent a16d0924f1
commit 35eca8c5e1

View File

@ -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;
}