re PR tree-optimization/83444 (missing strlen optimization on a member array of a...
authorJakub Jelinek <jakub@redhat.com>
Tue, 19 Dec 2017 18:10:04 +0000 (19:10 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 19 Dec 2017 18:10:04 +0000 (19:10 +0100)
commitad2a970f7973708ea3359c0b8cc2aec7c9ead1bb
tree85036f703ba660c24e544e555845177131f2ea78
parent4c9aa2cf8e59317ae73151c53fe84470b30c7ae9
re PR tree-optimization/83444 (missing strlen optimization on a member array of a local struct)

PR tree-optimization/83444
* tree-ssa-strlen.c (strlen_check_and_optimize_stmt): For the
character load case, if get_stridx on MEM_REF's operand doesn't
look usable, retry with get_addr_stridx.

* gcc.dg/strlenopt-38.c: New test.

From-SVN: r255835
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/strlenopt-38.c
gcc/tree-ssa-strlen.c