This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] Fold (~X & 4) != 0 as (X & 4) == 0.
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Roger Sayle" <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Feb 2006 10:45:03 +0100
- Subject: Re: [Committed] Fold (~X & 4) != 0 as (X & 4) == 0.
- References: <Pine.LNX.4.44.0602262002040.27742-100000@www.eyesopen.com>
On 2/27/06, Roger Sayle <roger@eyesopen.com> wrote:
>
> Argghh! The following patch was intended to resolve PR middle-end/14752,
> by allowing fold to absorb BIT_NOT_EXPR in bit tests such as the one
> above. Unfortunately, although this patch improves the attached test
> case, it doesn't affect Kazu's original example in the bugzilla PR!
> The difference is that Kazu's example uses "unsigned int" which somehow
> results in different trees to those I was expecting. The following
> patch fixes the variant of Kazu's code that uses "int" instead of
> "unsigned".
Another thing to verify is that the same transformations are applied if using
the C++ frontend. (No I didn't check this for you latest patches)
Richard.