This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] convert (a | b)^b to a & (~b)


Andrew Pinski <apinski at apple dot com> writes:

> This patch converts (a | b)^b to a & (~b).
> Since they are equivalent.
>
> ChangeLog:
> 2003-03-10  Andrew Pinski  <apinski at apple dot com>
>
> 	* combine.c (simplify_logical): [XOR] Convert
> 	(a | b)^b to a & (~b).

OK.

You might consider doing this in fold-const.c and cse.c as well
(doncha just love how many constant folders we have?)

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]