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]

[patch] PR44185 Fix new prefetch test failures


Hi,

Attached is the patch that fixes PR 44184: new prefetch test failure.
For gcc.dg/tree-ssa/prefetch-6.c, we add --param min-insn-to-prefetch-ratio=6 to generate
the desired number of prefetches.
For  gcc.dg/tree-ssa/prefetch-7.c, we remove --param max-unrolled-insns=1 to allow unrolling
and thus generating the desired prefetches. The count of "movnti" is also adjusted to reflect
the effect of unrolling.

Is it OK to check in for 4.6 trunk?

Thanks,

Changpeng
From 48e124dddd8fd5d62317a2d08eaf9afb14cac805 Mon Sep 17 00:00:00 2001
From: Changpeng Fang <chfang@houghton.(none)>
Date: Tue, 18 May 2010 12:08:44 -0700
Subject: [PATCH] PR 44185: Fix new prefetch test failures

	*gcc.dg/tree-ssa/prefetch-6.c: Add --param min-insn-to-prefetch-ratio=6.

	*gcc.dg/tree-ssa/prefetch-7.c: Remove --param max-unrolled-insns=1 to
        allow unrolling, and adjust the movnti count.
---
 gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c |    2 +-
 gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c
index 44f65bf..2675939 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c
@@ -1,6 +1,6 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 -fdump-tree-aprefetch-details" } */
+/* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 --param min-insn-to-prefetch-ratio=6 -fdump-tree-aprefetch-details" } */
 
 #define N 1000
 #define K 900
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
index 856df0a..f16c5d3 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c
@@ -1,7 +1,7 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=athlon" } } */
-/* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 --param max-unrolled-insns=1 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */
 
 #define K 1000000
 int a[K], b[K];
@@ -47,13 +47,13 @@ void test(int *p)
 /* { dg-final { scan-tree-dump-times "nontemporal store" 2 "aprefetch" } } */
 
 /* { dg-final { scan-tree-dump-times "builtin_prefetch" 8 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "=\\{nt\\}" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "=\\{nt\\}" 18 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_ia32_mfence" 2 "optimized" } } */
 
 /* { dg-final { scan-assembler-times "prefetchw" 5 } } */
 /* { dg-final { scan-assembler-times "prefetcht" 1 } } */
 /* { dg-final { scan-assembler-times "prefetchnta" 2 } } */
-/* { dg-final { scan-assembler-times "movnti" 2 } } */
+/* { dg-final { scan-assembler-times "movnti" 18 } } */
 /* { dg-final { scan-assembler-times "mfence" 2 } } */
 
 /* { dg-final { cleanup-tree-dump "aprefetch" } } */
-- 
1.6.3.3


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