On Mon, Jun 20, 2011 at 12:23 PM, Kai Tietz <ktiet...@googlemail.com> wrote:
> Hello,
>
> this patch adds to fold_binary_loc some missing optimization for binary
> and operations on truth-not expressions.
> Added cases are:
>  (!X & X) is always zero.
>  (X & !X) is always zero.
>  (X == 0) & X is always zero.
>  X & (X == 0) is always zero.
>  !X & 1 is X == 0
>
> ChangeLog
>
> 2011-06-20  Kai Tietz  <kti...@redhat.com>
>
>        * fold-const.c (fold_binary_loc): Add missing
>        folding for truth-not operations in combination
>        with binary and.
>
> ChangeLog
>
> 2011-06-20  Kai Tietz  <kti...@redhat.com>
>
>        * gcc.dg/binop-notand1.c: New test.
>        * gcc.dg/binop-notand2.c: New test.
>        * gcc.dg/binop-notand3.c: New test.
>        * gcc.dg/binop-notand4.c: New test.
>        * gcc.dg/binop-notand5.c: New test.
>        * gcc.dg/binop-notand6.c: New test.
>
> Boostrapped and tested for x86_64-pc-linux-gnu. Ok for apply?

Ok.

Thanks,
Richard.

> Regards,
> Kai
>

Reply via email to