Come up with hook libc_has_fast_function (PR middle-end/90263).
authorMartin Liska <mliska@suse.cz>
Mon, 20 May 2019 07:55:00 +0000 (09:55 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 20 May 2019 07:55:00 +0000 (07:55 +0000)
commitdb91c7cf3d97a169d4e1c463d87a9f2007c40761
tree11aa3bde6da1520b48d1a2a0cbf8e580e67e0c11
parent03105885b1502a971955908255c722df5be0dafd
Come up with hook libc_has_fast_function (PR middle-end/90263).

2019-05-20  Martin Liska  <mliska@suse.cz>

PR middle-end/90263
* builtins.c (expand_builtin_memory_copy_args): When having a
target with fast mempcpy implementation do now use memcpy.
* config/i386/i386.c (ix86_libc_has_fast_function): New.
(TARGET_LIBC_HAS_FAST_FUNCTION): Likewise.
* doc/tm.texi: Likewise.
* doc/tm.texi.in: Likewise.
* target.def:
* expr.c (emit_block_move_hints): Add 2 new arguments.
* expr.h (emit_block_move_hints): Bail out when libcall
to memcpy would be used.
2019-05-20  Martin Liska  <mliska@suse.cz>

PR middle-end/90263
* gcc.c-torture/compile/pr90263.c: New test.
* lib/target-supports.exp: Add check_effective_target_glibc.

From-SVN: r271400
gcc/ChangeLog
gcc/builtins.c
gcc/config/i386/i386.c
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/expr.c
gcc/expr.h
gcc/target.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr90263.c [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp