On Tue, Jan 17, 2012 at 8:06 AM, Andrew Pinski
<andrew.pin...@caviumnetworks.com> wrote:
> Hi,
>  This adds the folding of x & ((~x) | y)) into x & y on the tree
> level via fold-const.c
> There is already partly done on the RTL level but it would be a good
> thing for the tree level also.
>
>
> OK for 4.8 (yes I know we have not branched yet but I thought I would
> send it out so I don't forget about it)?
> Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Can you instead patch tree-ssa-forwprop.c:simplify_bitwise_binary?

Thanks,
Richard.

> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * fold-const.c (fold_binary_loc <case BIT_AND_EXPR>): Add folding of x
> & (~x | y) into x & y.
>
> testsuite/ChangeLog:
> * gcc.dg/tree-ssa/andor-3.c: New testcase.

Reply via email to