PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-02-08 Thread Hurugalawadi, Naveen
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

Re: PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-02-15 Thread Hurugalawadi, Naveen
Hi, >> I'm also failing to see why you can't enhance the existing Please find attached the patch that enhances the existing pattern. Please review the patch and let me know if any further modifications are required. Thanks, Naveendiff --git a/gcc/match.pd b/gcc/match.pd index 6c8ebd5..bd47a91 10

[PING] [PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-03-02 Thread Hurugalawadi, Naveen
Hi, Please find attached the patch that enhances the existing pattern. Please review the patch at the following link and let me know if there should be any modifications in it:- https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01035.html Thanks, Naveen

[PING2] [PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-03-21 Thread Hurugalawadi, Naveen
Hi, Please find attached the patch that enhances the existing pattern. Please review the patch at the following link and let me know if there should be any modifications in it:- https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01035.html Thanks, Naveen

Re: PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-04-06 Thread Richard Biener
On Tue, Feb 16, 2016 at 5:50 AM, Hurugalawadi, Naveen wrote: > Hi, > >>> I'm also failing to see why you can't enhance the existing > > Please find attached the patch that enhances the existing pattern. > Please review the patch and let me know if any further modifications > are required. What's

Re: PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-02-08 Thread Senthil Kumar Selvaraj
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, > Nav

Re: PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-02-08 Thread Richard Biener
On Mon, Feb 8, 2016 at 10:16 AM, Senthil Kumar Selvaraj wrote: > > 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

Re: PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-04-13 Thread Hurugalawadi, Naveen
Hi Richard, >> What's the motivation of splitting this into a equal type >> and a non-equal type case? Simply only allow nop-conversions here >> (tree_nop_conversion_p) and unconditionally emit Done. Thanks for the review and Comments. Implemented the modifications as per you review comments.

Re: PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-04-15 Thread Marc Glisse
--- a/gcc/match.pd +++ b/gcc/match.pd @@ -1896,10 +1896,13 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (for cmp (simple_comparison) scmp (swapped_simple_comparison) (simplify - (cmp (bit_not@2 @0) CONSTANT_CLASS_P@1) + (cmp (convert?@3 (bit_not@2 @0)) CONSTANT_CLASS_P@1) (if (single_use

[PING 3] [PATCH] Fix PR 31531: A microoptimization of isnegative of signed integer

2016-04-05 Thread Hurugalawadi, Naveen
Hi, Please review the patch at the following link and let me know if there should be any modifications in it:- https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01035.html Thanks, Naveen