This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC] Come up with TARGET_HAS_FAST_MEMPCPY_ROUTINE (PR middle-end/90263).


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]