[PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

Przemyslaw Wirkus Przemyslaw.Wirkus@arm.com
Fri Jun 19 09:03:03 GMT 2020


Hi all,

Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern.

Bootstrapped and tested on aarch64-none-linux-gnu.

OK for master ?

Cheers,
Przemyslaw

gcc/ChangeLog:

	PR tree-optimization/94880
	* match.pd (A | B) - B -> (A & ~B): New simplification.

gcc/testsuite/ChangeLog:

	PR tree-optimization/94880
	* gcc.dg/tree-ssa/pr94880.c: New Test.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr94880.txt
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200619/0961c502/attachment-0001.txt>


More information about the Gcc-patches mailing list