tree-ssa-strlen.c (fold_strstr_to_memcmp): New function.
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Wed, 14 Dec 2016 09:10:31 +0000 (09:10 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Wed, 14 Dec 2016 09:10:31 +0000 (09:10 +0000)
commit3b1970cb3c603c900a175d9c7c36428cc031920f
tree87482185bbedc0d7800e5662413a0b59a40d0755
parent164f063463d64a1575841d6735ba0298605c4626
tree-ssa-strlen.c (fold_strstr_to_memcmp): New function.

2016-12-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
    Jakub Jelinek  <jakub@redhat.com>

* 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.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r243633
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/strlenopt-30.c [new file with mode: 0644]
gcc/tree-ssa-strlen.c