* [PATCH] Add dump file checks for sms tests
@ 2009-04-27 6:57 Revital1 Eres
0 siblings, 0 replies; 2+ messages in thread
From: Revital1 Eres @ 2009-04-27 6:57 UTC (permalink / raw)
To: Ayal Zaks; +Cc: Andrey Belevantsev, bmei, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
Hello,
This patch adds dump file checks for sms tests in order to track the
number of loops that are been SMSed.
The checks are currently added only for spu and ppc.
Tested on spu and ppc.
OK for mainline?
Thanks,
Revital
Changelog:
* gcc.dg/sms-1.c: Add noinline attribute, create sms dump file
and check it.
* gcc.dg/sms-2.c: Add dump check.
* gcc.dg/sms-3.c: Add noinline attribute, create sms dump file
and check it.
* gcc.dg/sms-4.c: Likewise.
* gcc.dg/sms-5.c: Likewise.
* gcc.dg/sms-6.c: Likewise.
* gcc.dg/sms-7.c: Likewise.
* gcc.dg/sms-antideps.c: Rename to...
* gcc.dg/sms-8.c: This and add sms dump file and check it.
(See attached file: patch_sms_26_4.txt)
[-- Attachment #2: patch_sms_26_4.txt --]
[-- Type: text/plain, Size: 7266 bytes --]
Index: gcc.dg/sms-2.c
===================================================================
--- gcc.dg/sms-2.c (revision 146278)
+++ gcc.dg/sms-2.c (working copy)
@@ -33,4 +33,5 @@ fun (nb)
}
}
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
Index: gcc.dg/sms-4.c
===================================================================
--- gcc.dg/sms-4.c (revision 146278)
+++ gcc.dg/sms-4.c (working copy)
@@ -1,6 +1,6 @@
/* Inspired from sbitmap_a_or_b_and_c_cg function in sbitmap.c. */
/* { dg-do run } */
-/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves" } */
+/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
extern void abort (void);
@@ -9,6 +9,7 @@ int b[5] = { 0, 1, 0, 1, 0 };
int c[5] = { 0, 0, 1, 1, 0 };
int dst[5] = { 0, 0, 0, 0, 0 };
+__attribute__ ((noinline))
void
foo (int size, int *ap, int *bp, int *cp, int *dstp)
{
@@ -33,3 +34,6 @@ main ()
return 0;
}
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "sms" } } */
+
Index: gcc.dg/sms-6.c
===================================================================
--- gcc.dg/sms-6.c (revision 146278)
+++ gcc.dg/sms-6.c (working copy)
@@ -1,8 +1,9 @@
/* { dg-do run } */
-/* { dg-options "-O2 -fmodulo-sched " } */
+/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */
extern void abort (void);
+__attribute__ ((noinline))
void foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
{
int i;
@@ -37,4 +38,7 @@ int main()
return 0;
}
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "sms" } } */
Index: gcc.dg/sms-8.c
===================================================================
--- gcc.dg/sms-8.c (revision 0)
+++ gcc.dg/sms-8.c (revision 0)
@@ -0,0 +1,41 @@
+/* This test is a reduced test case for a bug that caused
+ bootstrapping with -fmodulo-sched. Related to a broken anti-dep
+ that was not fixed by reg-moves. */
+
+ /* { dg-do run } */
+ /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
+
+extern void abort (void);
+
+__attribute__ ((noinline))
+unsigned long long
+foo (long long ixi, unsigned ctr)
+{
+ unsigned long long irslt = 1;
+ long long ix = ixi;
+
+ for (; ctr; ctr--)
+ {
+ irslt *= ix;
+ ix *= ix;
+ }
+
+ if (irslt != 14348907)
+ abort ();
+ return irslt;
+}
+
+
+int
+main ()
+{
+ unsigned long long res;
+
+ res = foo (3, 4);
+ return 0;
+}
+
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "sms" } } */
+
+
Index: gcc.dg/sms-1.c
===================================================================
--- gcc.dg/sms-1.c (revision 146278)
+++ gcc.dg/sms-1.c (working copy)
@@ -1,13 +1,16 @@
/* The same test as loop-3c.c. It failed on ia64
due to not handling of subreg in the lhs that is fixed. */
/* { dg-do run } */
-/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -w" } */
+/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
#include <limits.h>
+extern void abort (void);
void * a[255];
+__attribute__ ((noinline))
+void
f (m)
{
int i;
@@ -21,6 +24,7 @@ f (m)
while (i < INT_MAX/2 + 1 + 4 * 4);
}
+int
main ()
{
a[0x10] = 0;
@@ -33,6 +37,9 @@ main ()
f (INT_MAX/2 + 1);
if (! a[0x10] || a[0x08])
abort ();
- exit (0);
+ return 0;
}
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* spu-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "sms" } } */
+
Index: gcc.dg/sms-3.c
===================================================================
--- gcc.dg/sms-3.c (revision 146278)
+++ gcc.dg/sms-3.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -fmodulo-sched -funroll-loops" } */
+/* { dg-options "-O2 -fmodulo-sched -funroll-loops -fdump-rtl-sms" } */
extern void abort (void);
@@ -8,6 +8,7 @@ int Y[1000]={0};
extern void abort (void);
+__attribute__ ((noinline))
int
foo (int len, long a)
{
@@ -37,3 +38,6 @@ main ()
return 0;
}
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "sms" } } */
+
Index: gcc.dg/sms-5.c
===================================================================
--- gcc.dg/sms-5.c (revision 146278)
+++ gcc.dg/sms-5.c (working copy)
@@ -1,10 +1,11 @@
/* { dg-do run } */
-/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -funroll-loops" } */
+/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -funroll-loops -fdump-rtl-sms" } */
/* This is the same test as loop-2e.c test. It is related to a fix in
the generation of the prolog and epilog. */
extern void abort (void);
+__attribute__ ((noinline))
void f (int *p, int **q)
{
int i;
@@ -45,3 +46,7 @@ int main ()
return 0;
}
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* spu-*-* } } } */
+
+/* { dg-final { cleanup-rtl-dump "sms" } } */
+
Index: gcc.dg/sms-7.c
===================================================================
--- gcc.dg/sms-7.c (revision 146278)
+++ gcc.dg/sms-7.c (working copy)
@@ -1,8 +1,9 @@
/* { dg-do run } */
-/* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing " } */
+/* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms" } */
extern void abort (void);
+__attribute__ ((noinline))
void foo (int * __restrict__ a, int * __restrict__ b, short * c)
{
int i;
@@ -38,4 +39,7 @@ int main()
return 0;
}
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "sms" } } */
Index: gcc.dg/sms-antideps.c
===================================================================
--- gcc.dg/sms-antideps.c (revision 146278)
+++ gcc.dg/sms-antideps.c (working copy)
@@ -1,38 +0,0 @@
-/* This test is a reduced test case for a bug that caused
- bootstrapping with -fmodulo-sched. Related to a broken anti-dep
- that was not fixed by reg-moves. */
-
- /* { dg-do run } */
- /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves" } */
-
-#include <stdlib.h>
-
-unsigned long long
-foo (long long ixi, unsigned ctr)
-{
- unsigned long long irslt = 1;
- long long ix = ixi;
-
- for (; ctr; ctr--)
- {
- irslt *= ix;
- ix *= ix;
- }
-
- if (irslt != 14348907)
- abort ();
- return irslt;
-}
-
-
-int
-main ()
-{
- unsigned long long res;
-
- res = foo (3, 4);
- return 0;
-}
-
-
-
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Add dump file checks for sms tests
[not found] <OF451EBF84.B79E1F48-ONC22575A4.00299F17-C22575A5.00256055@LocalDomain>
@ 2009-04-27 10:47 ` Ayal Zaks
0 siblings, 0 replies; 2+ messages in thread
From: Ayal Zaks @ 2009-04-27 10:47 UTC (permalink / raw)
To: Revital1 Eres; +Cc: Andrey Belevantsev, bmei, gcc-patches, Alexander Monakov
> Hello,
>
> This patch adds dump file checks for sms tests in order to track the
> number of loops that are been SMSed.
> The checks are currently added only for spu and ppc.
>
> Tested on spu and ppc.
>
> OK for mainline?
>
OK.>
Andrey/Alexander or Bingfeng, would you like to add checks for additional
targets such as ia-64 and x86?
Ayal.
> Thanks,
> Revital
>
> Changelog:
> * gcc.dg/sms-1.c: Add noinline attribute, create sms dump file
> and check it.
> * gcc.dg/sms-2.c: Add dump check.
> * gcc.dg/sms-3.c: Add noinline attribute, create sms dump file
> and check it.
> * gcc.dg/sms-4.c: Likewise.
> * gcc.dg/sms-5.c: Likewise.
> * gcc.dg/sms-6.c: Likewise.
> * gcc.dg/sms-7.c: Likewise.
> * gcc.dg/sms-antideps.c: Rename to...
> * gcc.dg/sms-8.c: This and add sms dump file and check it.
>
> [attachment "patch_sms_26_4.txt" deleted by Ayal Zaks/Haifa/IBM]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-27 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-27 6:57 [PATCH] Add dump file checks for sms tests Revital1 Eres
[not found] <OF451EBF84.B79E1F48-ONC22575A4.00299F17-C22575A5.00256055@LocalDomain>
2009-04-27 10:47 ` Ayal Zaks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).