This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Committed] Fold (~X & 4) != 0 as (X & 4) == 0.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]