This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Some middle-end improvements for bitfield handling
- From: Roger Sayle <roger at eyesopen dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Jun 2004 14:46:46 -0600 (MDT)
- Subject: Re: [PATCH] Some middle-end improvements for bitfield handling
On Tue, 29 Jun 2004, Jakub Jelinek wrote:
> 2004-06-29 Jakub Jelinek <jakub@redhat.com>
>
> * simplify-rtx.c (simplify_binary_operation): Simplify
> ((A & N) + B) & M -> (A + B) & M if M is pow2 minus 1 constant and
> N has at least all bits in M set as well.
>
> * expr.c (expand_assignment): Optimize += or -= on a bit field in
> most significant bits.
>
> * gcc.c-torture/execute/20040629-1.c: New test.
This is OK for mainline. Could you try these changes on the testcases
given in PR tree-optimization/15310, and see if that PR can be closed?
Your new test is case is a bit more cyptic that it needs to be.
You'll need to change the '#include "n.c"' to be "20040629-1.c"
to recursively include itself, and you seem to be using "T" both as
a macro and as the name of a structure. All good stuff to stress
the compiler, but perhaps you should add a comment or two about
what's going on, or simplify the test a little bit. Be sure to
check that the test works as it will be committed, before checking
it in.
Thanks,
Roger
--