This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Mon, 12 Mar 2018 11:08:11 +0100
- Subject: Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).
- Authentication-results: sourceware.org; auth=none
- References: <ec080dce-918a-c3e0-c9d6-a443b5fe204c@suse.cz>
On Mon, Mar 12, 2018 at 9:57 AM, Martin Liška <mliska@suse.cz> wrote:
> Hi.
>
> This is fix for the PR that introduces a new target macro. Using the macro
Don't add new target macros, use target hooks.
> one can say that a target has a fast mempcpy and thus it's preferred to be used
> if possible.
>
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
> I also tested on x86_64-linux-gnu.
>
> Ready to be installed?
> Martin
>
> gcc/ChangeLog:
>
> 2018-03-08 Martin Liska <mliska@suse.cz>
>
> PR middle-end/81657
> * builtins.c (expand_builtin_memory_copy_args): Add new
> arguments.
> * config/i386/i386.h (TARGET_HAS_FAST_MEMPCPY_ROUTINE):
> New macro.
> * defaults.h (TARGET_HAS_FAST_MEMPCPY_ROUTINE): Likewise.
> * doc/tm.texi: Likewise.
> * doc/tm.texi.in: Likewise.
> * expr.c (compare_by_pieces): Add support for bail out.
> (emit_block_move_hints): Likewise.
> * expr.h (emit_block_move_hints): Add new arguments.
>
> gcc/testsuite/ChangeLog:
>
> 2018-03-09 Martin Liska <mliska@suse.cz>
>
> PR middle-end/81657
> * gcc.dg/string-opt-1.c: Adjust test to run only on non-x86
> target.
> ---
> gcc/builtins.c | 13 ++++++++++++-
> gcc/config/i386/i386.h | 3 +++
> gcc/defaults.h | 7 +++++++
> gcc/doc/tm.texi | 5 +++++
> gcc/doc/tm.texi.in | 5 +++++
> gcc/expr.c | 16 +++++++++++++++-
> gcc/expr.h | 4 +++-
> gcc/testsuite/gcc.dg/string-opt-1.c | 4 ++--
> 8 files changed, 52 insertions(+), 5 deletions(-)
>
>