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: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known


On 12/14/2016 09:03 AM, Jakub Jelinek wrote:
> On Wed, Dec 14, 2016 at 01:27:44PM +0530, Prathamesh Kulkarni wrote:
>> 2016-12-14  Jakub Jelinek  <jakub@redhat.com>
>> 	    Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
>>
>> 	* tree-ssa-strlen.c (fold_strstr_to_memcmp): New function.
>> 	(strlen_optimize_stmt): Call fold_strstr_to_memcmp.
>>
>> testsuite/
>> 	* gcc.dg/strlenopt-30.c: New test-case.
> 
> Ok, thanks.
> But, you wrote the patch, so if you want to give me some credit, put
> yourself first at least.
> 
> 	Jakub
> 

Caused PR79196.

Thanks,
Martin


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