 gcc/testsuite/gcc.dg/strcmpopt_6.c             | 36 --------------------------
 gcc/testsuite/gcc.target/aarch64/strcmpopt_6.c | 36 ++++++++++++++++++++++++++
 gcc/testsuite/gcc.target/i386/strcmpopt_6.c    | 36 ++++++++++++++++++++++++++
 3 files changed, 72 insertions(+), 36 deletions(-)
 delete mode 100644 gcc/testsuite/gcc.dg/strcmpopt_6.c
 create mode 100644 gcc/testsuite/gcc.target/aarch64/strcmpopt_6.c
 create mode 100644 gcc/testsuite/gcc.target/i386/strcmpopt_6.c

diff --git a/gcc/testsuite/gcc.dg/strcmpopt_6.c b/gcc/testsuite/gcc.dg/strcmpopt_6.c
deleted file mode 100644
index 4c6de02..0000000
--- a/gcc/testsuite/gcc.dg/strcmpopt_6.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* When the specified length exceeds one of the arguments of the call to memcmp, 
-   the call to memcmp should NOT be inlined.  */
-/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-stringop-overflow" } */
-
-typedef struct { char s[8]; int x; } S;
-
-__attribute__ ((noinline)) int
-f1 (S * s)
-{
-  int result = 0;
-  result += __builtin_memcmp (s->s, "a", 3); 
-  return result;
-}
-
-__attribute__ ((noinline)) int
-f2 (char *p)
-{
-  int result = 0;
-  result += __builtin_memcmp (p, "a", 3); 
-  return result;
-}
-
-int main (void)
-{
-  S ss = {{'a','b','c'}, 2};
-  char *s = "abcd";
-
-  if (f1 (&ss) < 0 || f2 (s) < 0)
-    __builtin_abort ();
-
-  return 0;
-
-}
-
-/* { dg-final { scan-assembler-times "memcmp" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/strcmpopt_6.c b/gcc/testsuite/gcc.target/aarch64/strcmpopt_6.c
new file mode 100644
index 0000000..4c6de02
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/strcmpopt_6.c
@@ -0,0 +1,36 @@
+/* When the specified length exceeds one of the arguments of the call to memcmp, 
+   the call to memcmp should NOT be inlined.  */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wno-stringop-overflow" } */
+
+typedef struct { char s[8]; int x; } S;
+
+__attribute__ ((noinline)) int
+f1 (S * s)
+{
+  int result = 0;
+  result += __builtin_memcmp (s->s, "a", 3); 
+  return result;
+}
+
+__attribute__ ((noinline)) int
+f2 (char *p)
+{
+  int result = 0;
+  result += __builtin_memcmp (p, "a", 3); 
+  return result;
+}
+
+int main (void)
+{
+  S ss = {{'a','b','c'}, 2};
+  char *s = "abcd";
+
+  if (f1 (&ss) < 0 || f2 (s) < 0)
+    __builtin_abort ();
+
+  return 0;
+
+}
+
+/* { dg-final { scan-assembler-times "memcmp" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/strcmpopt_6.c b/gcc/testsuite/gcc.target/i386/strcmpopt_6.c
new file mode 100644
index 0000000..4c6de02
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/strcmpopt_6.c
@@ -0,0 +1,36 @@
+/* When the specified length exceeds one of the arguments of the call to memcmp, 
+   the call to memcmp should NOT be inlined.  */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wno-stringop-overflow" } */
+
+typedef struct { char s[8]; int x; } S;
+
+__attribute__ ((noinline)) int
+f1 (S * s)
+{
+  int result = 0;
+  result += __builtin_memcmp (s->s, "a", 3); 
+  return result;
+}
+
+__attribute__ ((noinline)) int
+f2 (char *p)
+{
+  int result = 0;
+  result += __builtin_memcmp (p, "a", 3); 
+  return result;
+}
+
+int main (void)
+{
+  S ss = {{'a','b','c'}, 2};
+  char *s = "abcd";
+
+  if (f1 (&ss) < 0 || f2 (s) < 0)
+    __builtin_abort ();
+
+  return 0;
+
+}
+
+/* { dg-final { scan-assembler-times "memcmp" 2 } } */
-- 
1.8.3.1

