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: PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer


Hurugalawadi, Naveen writes:

> Hi,
>
> Please find attached the patch that performs optimization on unsigned values.
>
> Original fold-const part implemented in match.pd.
>
> Please review the patch and let us know if it's OK?
>
> Regression Tested on X86_64 with no regressions.
>
> Thanks,
> Naveen
>
> ChangeLog:
> * match.pd (cmp (convert (bit_not @0)) INTEGER_CST@1): New Simplifier.
>
> Testsuite/ChangeLog:
> * gcc.dg/pr31531.c : New testcase.

Could you please add dg-require-effective-target int32 to the test to
avoid breaking targets with smaller ints (right shift by 31 bits)?

Regards
Senthil


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