Commit bd639075 by Revital Eres Committed by Revital Eres

Add dump file checks for sms tests

From-SVN: r146838
parent e97809c6
2009-04-27 Revital Eres <eres@il.ibm.com>
* 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.
2009-04-27 Eric Botcazou <ebotcazou@adacore.com> 2009-04-27 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt2.adb: New test. * gnat.dg/opt2.adb: New test.
......
/* The same test as loop-3c.c. It failed on ia64 /* The same test as loop-3c.c. It failed on ia64
due to not handling of subreg in the lhs that is fixed. */ due to not handling of subreg in the lhs that is fixed. */
/* { dg-do run } */ /* { 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> #include <limits.h>
extern void abort (void);
void * a[255]; void * a[255];
__attribute__ ((noinline))
void
f (m) f (m)
{ {
int i; int i;
...@@ -21,6 +24,7 @@ f (m) ...@@ -21,6 +24,7 @@ f (m)
while (i < INT_MAX/2 + 1 + 4 * 4); while (i < INT_MAX/2 + 1 + 4 * 4);
} }
int
main () main ()
{ {
a[0x10] = 0; a[0x10] = 0;
...@@ -33,6 +37,9 @@ main () ...@@ -33,6 +37,9 @@ main ()
f (INT_MAX/2 + 1); f (INT_MAX/2 + 1);
if (! a[0x10] || a[0x08]) if (! a[0x10] || a[0x08])
abort (); abort ();
exit (0); return 0;
} }
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* spu-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
...@@ -33,4 +33,5 @@ fun (nb) ...@@ -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" } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2 -fmodulo-sched -funroll-loops" } */ /* { dg-options "-O2 -fmodulo-sched -funroll-loops -fdump-rtl-sms" } */
extern void abort (void); extern void abort (void);
...@@ -8,6 +8,7 @@ int Y[1000]={0}; ...@@ -8,6 +8,7 @@ int Y[1000]={0};
extern void abort (void); extern void abort (void);
__attribute__ ((noinline))
int int
foo (int len, long a) foo (int len, long a)
{ {
...@@ -37,3 +38,6 @@ main () ...@@ -37,3 +38,6 @@ main ()
return 0; return 0;
} }
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
/* Inspired from sbitmap_a_or_b_and_c_cg function in sbitmap.c. */ /* Inspired from sbitmap_a_or_b_and_c_cg function in sbitmap.c. */
/* { dg-do run } */ /* { 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); extern void abort (void);
...@@ -9,6 +9,7 @@ int b[5] = { 0, 1, 0, 1, 0 }; ...@@ -9,6 +9,7 @@ int b[5] = { 0, 1, 0, 1, 0 };
int c[5] = { 0, 0, 1, 1, 0 }; int c[5] = { 0, 0, 1, 1, 0 };
int dst[5] = { 0, 0, 0, 0, 0 }; int dst[5] = { 0, 0, 0, 0, 0 };
__attribute__ ((noinline))
void void
foo (int size, int *ap, int *bp, int *cp, int *dstp) foo (int size, int *ap, int *bp, int *cp, int *dstp)
{ {
...@@ -33,3 +34,6 @@ main () ...@@ -33,3 +34,6 @@ main ()
return 0; return 0;
} }
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
/* { dg-do run } */ /* { 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 /* This is the same test as loop-2e.c test. It is related to a fix in
the generation of the prolog and epilog. */ the generation of the prolog and epilog. */
extern void abort (void); extern void abort (void);
__attribute__ ((noinline))
void f (int *p, int **q) void f (int *p, int **q)
{ {
int i; int i;
...@@ -45,3 +46,7 @@ int main () ...@@ -45,3 +46,7 @@ int main ()
return 0; return 0;
} }
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* spu-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2 -fmodulo-sched " } */ /* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */
extern void abort (void); extern void abort (void);
__attribute__ ((noinline))
void foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c) void foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
{ {
int i; int i;
...@@ -37,4 +38,7 @@ int main() ...@@ -37,4 +38,7 @@ int main()
return 0; 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" } } */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing " } */ /* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms" } */
extern void abort (void); extern void abort (void);
__attribute__ ((noinline))
void foo (int * __restrict__ a, int * __restrict__ b, short * c) void foo (int * __restrict__ a, int * __restrict__ b, short * c)
{ {
int i; int i;
...@@ -38,4 +39,7 @@ int main() ...@@ -38,4 +39,7 @@ int main()
return 0; 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" } } */
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
that was not fixed by reg-moves. */ that was not fixed by reg-moves. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves" } */ /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
#include <stdlib.h> extern void abort (void);
__attribute__ ((noinline))
unsigned long long unsigned long long
foo (long long ixi, unsigned ctr) foo (long long ixi, unsigned ctr)
{ {
...@@ -34,5 +35,7 @@ main () ...@@ -34,5 +35,7 @@ main ()
return 0; return 0;
} }
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment