This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: fold BIT_AND_EXPR's with ADDR_EXPR operands
On 9/23/07, Ollie Wild <aaw@google.com> wrote:
> On 9/20/07, Richard Guenther <richard.guenther@gmail.com> wrote:
>
> > Otherwise the patch should be ok after you incorporated the changes
> > (please re-post it).
>
> I've attached an updated patch. In addition to the changes we've
> discussed, I converted the switch statements to if-else chains as I
> believe this makes the code more legible.
This is ok for mainline if it passed bootstrap & regtest.
Thanks,
Richard.
> Ollie
>
> 2007-09-22 Ollie Wild <aaw@google.com>
>
> fold-const.c (fold_binary): Fold BIT_AND_EXPR's with a pointer operand.
> (get_pointer_modulus_and_residue): New function.
>
> 2007-09-22 Ollie Wild <aaw@google.com>
>
> gcc.dg/fold-bitand-1.c: New test.
> gcc.dg/fold-bitand-2.c: New test.
> gcc.dg/fold-bitand-3.c: New test.
> gcc.dg/fold-bitand-4.c: New test.
>
>