This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fold more boolean expressions
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: MCC CS <mcccs at gmx dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 Sep 2018 18:38:56 +0200 (CEST)
- Subject: Re: Fold more boolean expressions
- References: <trinity-a72ca4d5-53d7-47f9-9609-c54c00e9a0a2-1536674038993@3c-app-mailcom-bs11> <alpine.DEB.2.21.1809112315380.9826@stedding.saclay.inria.fr> <trinity-0342c4f1-4a4a-4952-9b03-4780deb5e0c8-1536938920211@3c-app-mailcom-bs12>
- Reply-to: gcc-patches at gcc dot gnu dot org
On Fri, 14 Sep 2018, MCC CS wrote:
+/* (~x & y) | ~(x | y) -> ~x */
+(simplify
+ (bit_ior:c (bit_and:c (bit_not @0) @1) (bit_not (bit_ior:c @0 @1)))
+ (bit_not @0))
As I said last time, you should not generate a new (bit_not @0) in the
output when there is already one in the input. Maybe
(simplify
(bit_ior:c (bit_and:c (bit_not@2 @0) @1) (bit_not (bit_ior:c @0 @1)))
@2)
--
Marc Glisse