https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78257

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <mse...@gcc.gnu.org>:

https://gcc.gnu.org/g:866626efd749ed3e2b7014e88e4340b5a4c73560

commit r11-2709-g866626efd749ed3e2b7014e88e4340b5a4c73560
Author: Martin Sebor <mse...@redhat.com>
Date:   Fri Aug 14 17:11:53 2020 -0600

    PR tree-optimization/78257 - missing memcmp optimization with constant
arrays

    gcc/ChangeLog:

            PR middle-end/78257
            * builtins.c (expand_builtin_memory_copy_args): Rename called
function.
            (expand_builtin_stpcpy_1): Remove argument from call.
            (expand_builtin_memcmp): Rename called function.
            (inline_expand_builtin_bytecmp): Same.
            * expr.c (convert_to_bytes): New function.
            (constant_byte_string): New function (formerly string_constant).
            (string_constant): Call constant_byte_string.
            (byte_representation): New function.
            * expr.h (byte_representation): Declare.
            * fold-const-call.c (fold_const_call): Rename called function.
            * fold-const.c (c_getstr): Remove an argument.
            (getbyterep): Define a new function.
            * fold-const.h (c_getstr): Remove an argument.
            (getbyterep): Declare a new function.
            * gimple-fold.c (gimple_fold_builtin_memory_op): Rename callee.
            (gimple_fold_builtin_string_compare): Same.
            (gimple_fold_builtin_memchr): Same.

    gcc/testsuite/ChangeLog:

            PR middle-end/78257
            * gcc.dg/memchr.c: New test.
            * gcc.dg/memcmp-2.c: New test.
            * gcc.dg/memcmp-3.c: New test.
            * gcc.dg/memcmp-4.c: New test.

Reply via email to