Move tests written for pr53397 from gcc.dg to gcc.target/i386
authorVenkataramanan Kumar <venkataramanan.kumar@amd.com>
Wed, 10 Oct 2012 15:31:27 +0000 (15:31 +0000)
committerVenkataramanan Kumar <vekumar@gcc.gnu.org>
Wed, 10 Oct 2012 15:31:27 +0000 (15:31 +0000)
From-SVN: r192318

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr53397-1.c [deleted file]
gcc/testsuite/gcc.dg/pr53397-2.c [deleted file]
gcc/testsuite/gcc.target/i386/pr53397-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr53397-2.c [new file with mode: 0644]

index 8517d8ee1e6b7b9d2d35bdf83f906854f46cca7f..c2e2f5b8d0ea87d2e15774b3fe906a1286767ddb 100644 (file)
@@ -1,3 +1,13 @@
+2012-10-10  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
+
+       PR testsuite/53397
+       * gcc.dg/pr53397-1.c: Moved to gcc.target/i386.
+       * gcc.target/i386/pr53397-1.c: Add -msse2 to dg-options
+       and remove target info from dg-do compile.
+       * gcc.dg/pr53397-2.c: Moved to gcc.target/i386.
+       * gcc.target/i386/pr53397-2.c: Add -msse2 to dg-options
+       and remove target info from dg-do compile.
+
 2012-10-10  Greta Yorsh  <Greta.Yorsh@arm.com>
 
        * gcc.dg/pr54782.c: Require target with pthread support.
diff --git a/gcc/testsuite/gcc.dg/pr53397-1.c b/gcc/testsuite/gcc.dg/pr53397-1.c
deleted file mode 100644 (file)
index abb83c6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Prefetching when the step is loop invariant.  */
-/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
-/* { dg-require-effective-target sse2 } */
-/* { dg-options "-O3 -fprefetch-loop-arrays -fdump-tree-aprefetch-details --param min-insn-to-prefetch-ratio=3 --param simultaneous-prefetches=10 -fdump-tree-aprefetch-details" } */
-
-
-double data[16384];
-void prefetch_when_non_constant_step_is_invariant(int step, int n)
-{
-     int a;
-     int b;
-     for (a = 1; a < step; a++) {
-        for (b = 0; b < n; b += 2 * step) {
-
-          int i = 2*(b + a);
-          int j = 2*(b + a + step);
-
-
-          data[j]   = data[i];
-          data[j+1] = data[i+1];
-        }
-     }
-}
-
-/* { dg-final { scan-tree-dump "Issued prefetch" "aprefetch" } } */
-/* { dg-final { scan-assembler "prefetcht0" } } */
-
-/* { dg-final { cleanup-tree-dump "aprefetch" } } */
diff --git a/gcc/testsuite/gcc.dg/pr53397-2.c b/gcc/testsuite/gcc.dg/pr53397-2.c
deleted file mode 100644 (file)
index 4793ae0..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Not prefetching when the step is loop variant.  */
-/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
-/* { dg-require-effective-target sse2 } */
-/* { dg-options "-O3 -fprefetch-loop-arrays -fdump-tree-aprefetch-details --param min-insn-to-prefetch-ratio=3 --param simultaneous-prefetches=10 -fdump-tree-aprefetch-details" } */
-
-double data[16384];
-void donot_prefetch_when_non_constant_step_is_variant(int step, int n)
-{ 
-     int a;
-     int b;
-     for (a = 1; a < step; a++,step*=2) {
-        for (b = 0; b < n; b += 2 * step) {
-
-          int i = 2*(b + a);
-          int j = 2*(b + a + step);
-
-
-          data[j]   = data[i];
-          data[j+1] = data[i+1];
-        }
-     } 
-}
-
-/* { dg-final { scan-tree-dump "Not prefetching" "aprefetch" } } */
-/* { dg-final { scan-tree-dump "loop variant step" "aprefetch" } } */
-
-/* { dg-final { cleanup-tree-dump "aprefetch" } } */
-
diff --git a/gcc/testsuite/gcc.target/i386/pr53397-1.c b/gcc/testsuite/gcc.target/i386/pr53397-1.c
new file mode 100644 (file)
index 0000000..6365036
--- /dev/null
@@ -0,0 +1,28 @@
+/* Prefetching when the step is loop invariant.  */
+/* { dg-do compile } */
+/* { dg-require-effective-target sse2 } */
+/* { dg-options "-O3 -msse2 -fprefetch-loop-arrays -fdump-tree-aprefetch-details --param min-insn-to-prefetch-ratio=3 --param simultaneous-prefetches=10 -fdump-tree-aprefetch-details" } */
+
+
+double data[16384];
+void prefetch_when_non_constant_step_is_invariant(int step, int n)
+{
+     int a;
+     int b;
+     for (a = 1; a < step; a++) {
+        for (b = 0; b < n; b += 2 * step) {
+
+          int i = 2*(b + a);
+          int j = 2*(b + a + step);
+
+
+          data[j]   = data[i];
+          data[j+1] = data[i+1];
+        }
+     }
+}
+
+/* { dg-final { scan-tree-dump "Issued prefetch" "aprefetch" } } */
+/* { dg-final { scan-assembler "prefetcht0" } } */
+
+/* { dg-final { cleanup-tree-dump "aprefetch" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr53397-2.c b/gcc/testsuite/gcc.target/i386/pr53397-2.c
new file mode 100644 (file)
index 0000000..b34fafc
--- /dev/null
@@ -0,0 +1,28 @@
+/* Not prefetching when the step is loop variant.  */
+/* { dg-do compile } */
+/* { dg-require-effective-target sse2 } */
+/* { dg-options "-O3 -msse2 -fprefetch-loop-arrays -fdump-tree-aprefetch-details --param min-insn-to-prefetch-ratio=3 --param simultaneous-prefetches=10 -fdump-tree-aprefetch-details" } */
+
+double data[16384];
+void donot_prefetch_when_non_constant_step_is_variant(int step, int n)
+{ 
+     int a;
+     int b;
+     for (a = 1; a < step; a++,step*=2) {
+        for (b = 0; b < n; b += 2 * step) {
+
+          int i = 2*(b + a);
+          int j = 2*(b + a + step);
+
+
+          data[j]   = data[i];
+          data[j+1] = data[i+1];
+        }
+     } 
+}
+
+/* { dg-final { scan-tree-dump "Not prefetching" "aprefetch" } } */
+/* { dg-final { scan-tree-dump "loop variant step" "aprefetch" } } */
+
+/* { dg-final { cleanup-tree-dump "aprefetch" } } */
+