This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Come up with TARGET_HAS_FAST_MEMPCPY_ROUTINE (PR middle-end/90263).
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Martin Liška <mliska at suse dot cz>, Jakub Jelinek <jakub at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Mon, 13 May 2019 13:02:17 +0000
- Subject: Re: [PATCH][RFC] Come up with TARGET_HAS_FAST_MEMPCPY_ROUTINE (PR middle-end/90263).
- References: <e8923b5d-2a1f-c1b4-9b7f-a970ae88f8a2@suse.cz> <20190510092148.GL19695@tucnak>,<67a1c0d2-9e6b-883c-8444-66eff9dcbd05@suse.cz>
Hi Martin,
+++ b/gcc/testsuite/gcc.c-torture/pr90263.c
@@ -0,0 +1,9 @@
+/* PR middle-end/90263 */
+
+int *f (int *p, int *q, long n)
+{
+ return __builtin_mempcpy (p, q, n);
+}
+
+/* { dg-final { scan-assembler "mempcpy" { target { i?86-*-* x86_64-*-* } } } } */
+/* { dg-final { scan-assembler "memcpy" { target { ! { i?86-*-* x86_64-*-* } } } } } */
This should be gcc/testsuite/gcc.c-torture/compile/pr90263.c, otherwise it is
ignored. The scan-assembler would also need to check for GLIBC unless you
always skip it on x86 (we don't seem to have a check_effective_target_glibc,
maybe it's worth adding?).
Wilco