Commit 2ac57409 by Sebastian Pop Committed by Sebastian Pop

Modify the testsuite for the new Graphite.

2009-07-30  Sebastian Pop  <sebastian.pop@amd.com>

	* gcc.dg/graphite/graphite.exp: Implement an automatic selection of
	flags based on the name of the testcase.
	* gfortran.dg/graphite/graphite.exp: Same.

	* gcc.dg/graphite/block-0.c: Adjusted.
	* gcc.dg/graphite/block-1.c: Adjusted.
	* gcc.dg/graphite/block-2.c: Adjusted.
	* gcc.dg/graphite/block-3.c: Adjusted.
	* gcc.dg/graphite/block-4.c: Adjusted.
	* gcc.dg/graphite/block-5.c: Adjusted.
	* gcc.dg/graphite/block-6.c: Adjusted.
	* gcc.dg/graphite/pr37485.c: Adjusted.
	* gcc.dg/graphite/pr37684.c: Adjusted.
	* gcc.dg/graphite/pr37828.c: Adjusted.
	* gcc.dg/graphite/pr37883.c: Adjusted.
	* gcc.dg/graphite/pr37928.c: Adjusted.
	* gcc.dg/graphite/pr37943.c: Adjusted.
	* gcc.dg/graphite/pr38409.c: Adjusted.
	* gcc.dg/graphite/pr38498.c: Adjusted.
	* gcc.dg/graphite/pr38559.c: Adjusted.
	* gcc.dg/graphite/pr39335.c: Adjusted.
	* gcc.dg/graphite/pr39335_1.c: Adjusted.
	* gcc.dg/graphite/scop-0.c: Adjusted.
	* gcc.dg/graphite/scop-1.c: Adjusted.
	* gcc.dg/graphite/scop-10.c: Adjusted.
	* gcc.dg/graphite/scop-11.c: Adjusted.
	* gcc.dg/graphite/scop-12.c: Adjusted.
	* gcc.dg/graphite/scop-13.c: Adjusted.
	* gcc.dg/graphite/scop-14.c: Adjusted.
	* gcc.dg/graphite/scop-15.c: Adjusted.
	* gcc.dg/graphite/scop-16.c: Adjusted.
	* gcc.dg/graphite/scop-17.c: Adjusted.
	* gcc.dg/graphite/scop-18.c: Adjusted.
	* gcc.dg/graphite/scop-19.c: Adjusted.
	* gcc.dg/graphite/scop-2.c: Adjusted.
	* gcc.dg/graphite/scop-3.c: Adjusted.-
	* gcc.dg/graphite/scop-4.c: Adjusted.
	* gcc.dg/graphite/scop-5.c: Adjusted.
	* gcc.dg/graphite/scop-6.c: Adjusted.
	* gcc.dg/graphite/scop-7.c: Adjusted.
	* gcc.dg/graphite/scop-8.c: Adjusted.
	* gcc.dg/graphite/scop-9.c: Adjusted.
	* gcc.dg/graphite/scop-matmult.c: Adjusted.
	* gfortran.dg/graphite/block-1.f90: Adjusted.
	* gfortran.dg/graphite/block-2.f: Adjusted.
	* gfortran.dg/graphite/block-3.f90: Adjusted.
	* gfortran.dg/graphite/block-4.f90: Adjusted.
	* gfortran.dg/graphite/id-2.f90: Adjusted.
	* gfortran.dg/graphite/id-3.f90: Adjusted.
	* gfortran.dg/graphite/id-4.f90: Adjusted.
	* gfortran.dg/graphite/pr37852.f90: Adjusted.
	* gfortran.dg/graphite/pr37857.f90: Adjusted.
	* gfortran.dg/graphite/pr37980.f90: Adjusted.
	* gfortran.dg/graphite/pr38083.f90: Adjusted.
	* gfortran.dg/graphite/pr38953.f90: Adjusted.
	* gfortran.dg/graphite/scop-1.f: Adjusted.

From-SVN: r150302
parent 204b560f
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/graphite/graphite.exp: Implement an automatic selection of
flags based on the name of the testcase.
* gfortran.dg/graphite/graphite.exp: Same.
* gcc.dg/graphite/block-0.c: Adjusted.
* gcc.dg/graphite/block-1.c: Adjusted.
* gcc.dg/graphite/block-2.c: Adjusted.
* gcc.dg/graphite/block-3.c: Adjusted.
* gcc.dg/graphite/block-4.c: Adjusted.
* gcc.dg/graphite/block-5.c: Adjusted.
* gcc.dg/graphite/block-6.c: Adjusted.
* gcc.dg/graphite/pr37485.c: Adjusted.
* gcc.dg/graphite/pr37684.c: Adjusted.
* gcc.dg/graphite/pr37828.c: Adjusted.
* gcc.dg/graphite/pr37883.c: Adjusted.
* gcc.dg/graphite/pr37928.c: Adjusted.
* gcc.dg/graphite/pr37943.c: Adjusted.
* gcc.dg/graphite/pr38409.c: Adjusted.
* gcc.dg/graphite/pr38498.c: Adjusted.
* gcc.dg/graphite/pr38559.c: Adjusted.
* gcc.dg/graphite/pr39335.c: Adjusted.
* gcc.dg/graphite/pr39335_1.c: Adjusted.
* gcc.dg/graphite/scop-0.c: Adjusted.
* gcc.dg/graphite/scop-1.c: Adjusted.
* gcc.dg/graphite/scop-10.c: Adjusted.
* gcc.dg/graphite/scop-11.c: Adjusted.
* gcc.dg/graphite/scop-12.c: Adjusted.
* gcc.dg/graphite/scop-13.c: Adjusted.
* gcc.dg/graphite/scop-14.c: Adjusted.
* gcc.dg/graphite/scop-15.c: Adjusted.
* gcc.dg/graphite/scop-16.c: Adjusted.
* gcc.dg/graphite/scop-17.c: Adjusted.
* gcc.dg/graphite/scop-18.c: Adjusted.
* gcc.dg/graphite/scop-19.c: Adjusted.
* gcc.dg/graphite/scop-2.c: Adjusted.
* gcc.dg/graphite/scop-3.c: Adjusted.-
* gcc.dg/graphite/scop-4.c: Adjusted.
* gcc.dg/graphite/scop-5.c: Adjusted.
* gcc.dg/graphite/scop-6.c: Adjusted.
* gcc.dg/graphite/scop-7.c: Adjusted.
* gcc.dg/graphite/scop-8.c: Adjusted.
* gcc.dg/graphite/scop-9.c: Adjusted.
* gcc.dg/graphite/scop-matmult.c: Adjusted.
* gfortran.dg/graphite/block-1.f90: Adjusted.
* gfortran.dg/graphite/block-2.f: Adjusted.
* gfortran.dg/graphite/block-3.f90: Adjusted.
* gfortran.dg/graphite/block-4.f90: Adjusted.
* gfortran.dg/graphite/id-2.f90: Adjusted.
* gfortran.dg/graphite/id-3.f90: Adjusted.
* gfortran.dg/graphite/id-4.f90: Adjusted.
* gfortran.dg/graphite/pr37852.f90: Adjusted.
* gfortran.dg/graphite/pr37857.f90: Adjusted.
* gfortran.dg/graphite/pr37980.f90: Adjusted.
* gfortran.dg/graphite/pr38083.f90: Adjusted.
* gfortran.dg/graphite/pr38953.f90: Adjusted.
* gfortran.dg/graphite/scop-1.f: Adjusted.
2009-07-30 Doug Kwan <dougkwan@google.com> 2009-07-30 Doug Kwan <dougkwan@google.com>
* gcc.target/arm/neon/polytypes.c: Adjust test for new notes * gcc.target/arm/neon/polytypes.c: Adjust test for new notes
......
/* { dg-options "-O -floop-block -fdump-tree-graphite-all" } */
#define N 1000 #define N 1000
int toto() int toto()
...@@ -21,5 +19,5 @@ main() ...@@ -21,5 +19,5 @@ main()
return toto(); return toto();
} }
/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite"} } */ /* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
#define MAX 8192 #define MAX 8192
void bar (void); void bar (void);
...@@ -36,5 +34,5 @@ int main() ...@@ -36,5 +34,5 @@ int main()
return sum; return sum;
} }
/* { dg-final { scan-tree-dump-times "will be loop blocked" 2 "graphite"} } */ /* { dg-final { scan-tree-dump-times "will be loop blocked" 2 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
typedef unsigned char UChar; typedef unsigned char UChar;
typedef int Int32; typedef int Int32;
typedef unsigned int UInt32; typedef unsigned int UInt32;
......
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
#define N 24 #define N 24
#define M 100 #define M 100
......
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
#define N 24 #define N 24
#define M 1000 #define M 1000
......
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
#define N 10000 #define N 10000
void foo (int); void foo (int);
int test () int test ()
...@@ -22,5 +20,5 @@ int test () ...@@ -22,5 +20,5 @@ int test ()
} }
/* Interchange is legal for loops 0 and 1 of the first two SCoPs */ /* Interchange is legal for loops 0 and 1 of the first two SCoPs */
/* { dg-final { scan-tree-dump-times "Interchange valid for loops 0 and 1:" 2 "graphite"} } */ /* { dg-final { scan-tree-dump-times "Interchange valid for loops 0 and 1:" 2 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
#define N 10000 #define N 10000
void foo (int); void foo (int);
int test () int test ()
...@@ -21,5 +19,5 @@ int test () ...@@ -21,5 +19,5 @@ int test ()
} }
/* Interchange is not legal for loops 0 and 1 of SCoP 2. */ /* Interchange is not legal for loops 0 and 1 of SCoP 2. */
/* { dg-final { scan-tree-dump-times "Interchange not valid for loops 0 and 1:" 1 "graphite"} } */ /* { dg-final { scan-tree-dump-times "Interchange not valid for loops 0 and 1:" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */
...@@ -23,23 +23,66 @@ if ![check_effective_target_fgraphite] { ...@@ -23,23 +23,66 @@ if ![check_effective_target_fgraphite] {
return return
} }
# Remove VALUE from LIST_VARIABLE.
proc lremove {list_variable value} {
upvar 1 $list_variable var
set idx [lsearch -exact $var $value]
set var [lreplace $var $idx $idx]
}
# The default action for a test is 'compile'. Save current default. # The default action for a test is 'compile'. Save current default.
global dg-do-what-default global dg-do-what-default
set save-dg-do-what-default ${dg-do-what-default} set save-dg-do-what-default ${dg-do-what-default}
set dg-do-what-default compile set dg-do-what-default compile
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
set DEFAULT_CFLAGS " -ansi -pedantic-errors"
}
# Initialize `dg'. # Initialize `dg'.
dg-init dg-init
# Main loop. # Main loop.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
"" $DEFAULT_CFLAGS set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c ] ]
# Flags using for block-* files.
set DEFAULT_CFLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all"
set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.c ] ]
dg-runtest $block_files "" $DEFAULT_CFLAGS_GRAPHITE_BLOCK
foreach block_file $block_files {lremove wait_to_run_files $block_file}
# Flags using for id-* files.
set DEFAULT_CFLAGS_GRAPHITE_IDENTITY "-O2 -fgraphite-identity -fdump-tree-graphite-all"
set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ]
dg-runtest $id_files "" $DEFAULT_CFLAGS_GRAPHITE_IDENTITY
foreach id_file $id_files {lremove wait_to_run_files $id_file}
# Flags using for interchange-* files.
set DEFAULT_CFLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all -floop-interchange"
set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c ] ]
dg-runtest $interchange_files "" $DEFAULT_CFLAGS_GRAPHITE_BLOCK
foreach interchange_file $interchange_files {lremove wait_to_run_files $interchange_file}
# Flags using for scop-* files.
set DEFAULT_CFLAGS_GRAPHITE_SCOP "-O2 -fgraphite -fdump-tree-graphite-all"
set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.c ] ]
dg-runtest $scop_files "" $DEFAULT_CFLAGS_GRAPHITE_SCOP
foreach scop_file $scop_files {lremove wait_to_run_files $scop_file}
# Schedule now the tests to be run.
set dg-do-what-default run
# Flags using for run-id-* files.
set DEFAULT_CFLAGS_RUN_ID "-O2 -fgraphite-identity"
set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ]
dg-runtest $run_id_files "" $DEFAULT_CFLAGS_RUN_ID
foreach run_id_file $run_id_files {lremove wait_to_run_files $run_id_file}
# The default action for the rest of the files is 'compile'.
set dg-do-what-default compile
# Flags using for other files.
set DEFAULT_CFLAGS_GRAPHITE "-ansi -pedantic-errors"
dg-runtest $wait_to_run_files "" $DEFAULT_CFLAGS_GRAPHITE
# Clean up. # Clean up.
set dg-do-what-default ${save-dg-do-what-default} set dg-do-what-default ${save-dg-do-what-default}
......
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ /* { dg-options "-O2 -fdump-tree-graphite-all" } */
typedef unsigned char UChar; typedef unsigned char UChar;
typedef int Int32; typedef int Int32;
......
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ /* { dg-options "-O2 -fdump-tree-graphite-all" } */
typedef struct _IO_FILE FILE; typedef struct _IO_FILE FILE;
struct _IO_marker { struct _IO_marker {
......
/* { dg-options "-O2 -floop-block" } */ /* { dg-options "-O2" } */
typedef struct foo typedef struct foo
{ {
......
/* { dg-options "-O3 -floop-block" } */ /* { dg-options "-O3" } */
void test_sort() void test_sort()
{ {
......
/* { dg-options "-O3 -floop-block" } */ /* { dg-options "-O3" } */
int get_state(int size, int *node, int *hash) int get_state(int size, int *node, int *hash)
{ {
......
...@@ -31,4 +31,3 @@ unsigned char compress(test *in) ...@@ -31,4 +31,3 @@ unsigned char compress(test *in)
} }
/* { dg-final { cleanup-tree-dump "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */
/* { dg-options "-O2 -floop-block" } */ /* { dg-options "-O2" } */
typedef struct test input ; typedef struct test input ;
struct test struct test
......
/* { dg-options "-O2 -floop-block" } */ /* { dg-options "-O2" } */
double test_vector (float **data, int rows, int cols, int vqrows,double epsilon, int maxiter,int **mean, int *map) double test_vector (float **data, int rows, int cols, int vqrows,double epsilon, int maxiter,int **mean, int *map)
{ {
......
/* { dg-options "-O2 -floop-block" } */ /* { dg-options "-O2" } */
int test() int test()
{ {
......
/* { dg-options "-O2 -floop-interchange" } */ /* { dg-options "-O2" } */
typedef unsigned char byte; typedef unsigned char byte;
typedef struct gx_device_s gx_device; typedef struct gx_device_s gx_device;
......
/* { dg-options "-O2 -floop-interchange" } */ /* { dg-options "-O2" } */
void crash_me(int num1, int num2, char * in, char * out) void crash_me(int num1, int num2, char * in, char * out)
{ {
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
int foo (void); int foo (void);
void bar (void); void bar (void);
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (void); void bar (void);
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (void); void bar (void);
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (); void bar ();
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (); void bar ();
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (); void bar ();
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (); void bar ();
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
# define EXTERN(type, array) extern type array[] # define EXTERN(type, array) extern type array[]
typedef unsigned char uch; typedef unsigned char uch;
typedef unsigned short ush; typedef unsigned short ush;
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
#define N 10000 #define N 10000
void foo (int); void foo (int);
int test () int test ()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
#define N 10000 #define N 10000
void foo (int); void foo (int);
int test () int test ()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
#define N 24 #define N 24
#define M 1000 #define M 1000
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
typedef unsigned int __uint32_t; typedef unsigned int __uint32_t;
typedef __uint32_t __size_t; typedef __uint32_t __size_t;
typedef __size_t size_t; typedef __size_t size_t;
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (void); void bar (void);
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
int toto() int toto()
{ {
int i, j, k; int i, j, k;
...@@ -26,5 +24,5 @@ int toto() ...@@ -26,5 +24,5 @@ int toto()
return a[3][5] + b[1]; return a[3][5] + b[1];
} }
/* { dg-final { scan-tree-dump-times "number of SCoPs: 3" 1 "graphite"} } */ /* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite"} } */
/* { dg-final { cleanup-tree-dump "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (); void bar ();
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (); void bar ();
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (void); void bar (void);
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (void); void bar (void);
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
int bar (void); int bar (void);
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
void bar (void); void bar (void);
int toto() int toto()
......
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
float A[1000][1000], B[1000][1000], C[1000][1000]; float A[1000][1000], B[1000][1000], C[1000][1000];
/* Multiply two n x n matrices A and B and store the result in C. */ /* Multiply two n x n matrices A and B and store the result in C. */
...@@ -16,5 +14,5 @@ void matmult (int n) ...@@ -16,5 +14,5 @@ void matmult (int n)
/* This one fails because the number of iterations cannot be /* This one fails because the number of iterations cannot be
determined anymore for the outermost loop. */ determined anymore for the outermost loop. */
/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */
! { dg-options "-O2 -floop-block -fdump-tree-graphite-all" }
subroutine matrix_multiply(a,b,c,n) subroutine matrix_multiply(a,b,c,n)
real(8), dimension(n,n) :: a,b,c real(8), dimension(n,n) :: a,b,c
......
! { dg-options "-O2 -floop-block -fdump-tree-graphite-all" }
SUBROUTINE MATRIX_MUL_UNROLLED (A, B, C, L, M, N) SUBROUTINE MATRIX_MUL_UNROLLED (A, B, C, L, M, N)
DIMENSION A(L,M), B(M,N), C(L,N) DIMENSION A(L,M), B(M,N), C(L,N)
......
! { dg-options "-O2 -floop-block -fdump-tree-graphite-all" }
subroutine matrix_multiply(a,b,c,n) subroutine matrix_multiply(a,b,c,n)
real(8), dimension(n,n) :: a,b,c real(8), dimension(n,n) :: a,b,c
......
! { dg-options "-O2 -floop-block -fdump-tree-graphite-all" }
subroutine matrix_multiply(a,b,c,n) subroutine matrix_multiply(a,b,c,n)
real(8), dimension(n,n) :: a,b,c real(8), dimension(n,n) :: a,b,c
......
...@@ -23,23 +23,64 @@ if ![check_effective_target_fgraphite] { ...@@ -23,23 +23,64 @@ if ![check_effective_target_fgraphite] {
return return
} }
# Remove VALUE from LIST_VARIABLE.
proc lremove {list_variable value} {
upvar 1 $list_variable var
set idx [lsearch -exact $var $value]
set var [lreplace $var $idx $idx]
}
# The default action for a test is 'compile'. Save current default. # The default action for a test is 'compile'. Save current default.
global dg-do-what-default global dg-do-what-default
set save-dg-do-what-default ${dg-do-what-default} set save-dg-do-what-default ${dg-do-what-default}
set dg-do-what-default compile set dg-do-what-default compile
# If a testcase doesn't have special options, use these.
set DEFAULT_GRAPHITE_FLAGS ""
# Initialize `dg'. # Initialize `dg'.
dg-init dg-init
# Main loop. # Main loop.
gfortran-dg-runtest [lsort \ set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ]
[glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] $DEFAULT_GRAPHITE_FLAGS
# Flags using for block-* files.
set DEFAULT_FLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all"
set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.\[fF\]{,90,95,03,08} ] ]
gfortran-dg-runtest $block_files $DEFAULT_FLAGS_GRAPHITE_BLOCK
foreach block_file $block_files {lremove wait_to_run_files $block_file}
# Flags using for id-* files.
set DEFAULT_FLAGS_GRAPHITE_IDENTITY "-O2 -fgraphite-identity -fdump-tree-graphite-all"
set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.\[fF\]{,90,95,03,08} ] ]
gfortran-dg-runtest $id_files $DEFAULT_FLAGS_GRAPHITE_IDENTITY
foreach id_file $id_files {lremove wait_to_run_files $id_file}
# Flags using for interchange-* files.
set DEFAULT_FLAGS_GRAPHITE_BLOCK "-O2 -fdump-tree-graphite-all -floop-interchange"
set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.\[fF\]{,90,95,03,08} ] ]
gfortran-dg-runtest $interchange_files $DEFAULT_FLAGS_GRAPHITE_BLOCK
foreach interchange_file $interchange_files {lremove wait_to_run_files $interchange_file}
gfortran-dg-runtest [lsort \ # Flags using for scop-* files.
[glob -nocomplain $srcdir/$subdir/g77/*.\[fF\] ] ] $DEFAULT_GRAPHITE_FLAGS set DEFAULT_FLAGS_GRAPHITE_SCOP "-O2 -fgraphite -fdump-tree-graphite-all"
set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.\[fF\]{,90,95,03,08} ] ]
gfortran-dg-runtest $scop_files $DEFAULT_FLAGS_GRAPHITE_SCOP
foreach scop_file $scop_files {lremove wait_to_run_files $scop_file}
# Schedule now the tests to be run.
set dg-do-what-default run
# Flags using for run-id-* files.
set DEFAULT_FLAGS_RUN_ID "-O2 -fgraphite-identity"
set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.\[fF\]{,90,95,03,08} ] ]
gfortran-dg-runtest $run_id_files $DEFAULT_FLAGS_RUN_ID
foreach run_id_file $run_id_files {lremove wait_to_run_files $run_id_file}
# The default action for the rest of the files is 'compile'.
set dg-do-what-default compile
# Flags using for other files.
set DEFAULT_GRAPHITE_FLAGS ""
gfortran-dg-runtest $wait_to_run_files $DEFAULT_GRAPHITE_FLAGS
# Clean up. # Clean up.
set dg-do-what-default ${save-dg-do-what-default} set dg-do-what-default ${save-dg-do-what-default}
......
! { dg-options "-O2 -fgraphite-identity" }
module solv_cap module solv_cap
integer, parameter, public :: dp = selected_real_kind(5) integer, parameter, public :: dp = selected_real_kind(5)
contains contains
......
! { dg-options "-O2 -fgraphite-identity" }
subroutine gentrs (ptrst, ncls, xmin, dcls, xdont, ndon) subroutine gentrs (ptrst, ncls, xmin, dcls, xdont, ndon)
do icls1 = 1, ncls do icls1 = 1, ncls
prec: do prec: do
......
! { dg-options "-O2 -fgraphite-identity" }
MODULE Vcimage MODULE Vcimage
CHARACTER (LEN=80), SAVE :: CARD, FIELD CHARACTER (LEN=80), SAVE :: CARD, FIELD
END MODULE Vcimage END MODULE Vcimage
......
! { dg-options "-O2 -floop-block" } ! { dg-options "-O2 " }
PROGRAM TEST_FPU PROGRAM TEST_FPU
CHARACTER (LEN=36) :: invert_id(1) = & CHARACTER (LEN=36) :: invert_id(1) = &
......
! { dg-options "-O2 -floop-block" } ! { dg-options "-O2 " }
program superficie_proteina program superficie_proteina
integer, parameter :: LONGreal = selected_real_kind(12,90) integer, parameter :: LONGreal = selected_real_kind(12,90)
......
! { dg-options "-O2 -floop-block" } ! { dg-options "-O2 " }
module INT_MODULE module INT_MODULE
contains contains
......
! { dg-options "-O3 -floop-block" } ! { dg-options "-O3 " }
SUBROUTINE IVSORT (IL,IH,NSEGS,IOUNIT) SUBROUTINE IVSORT (IL,IH,NSEGS,IOUNIT)
INTEGER IOUNIT INTEGER IOUNIT
......
! { dg-options "-O3 -floop-block -fgraphite-identity" } ! { dg-options "-O3 -fgraphite-identity" }
MODULE MAIN1 MODULE MAIN1
INTEGER , PARAMETER :: IFMAX = 40 , IKN = 85 , ISTRG = 132 , & INTEGER , PARAMETER :: IFMAX = 40 , IKN = 85 , ISTRG = 132 , &
......
C { dg-options "-O2 -fgraphite" }
dimension p1(2),t(6,4),b1(2),b2(2),al1(2),al2(2),g1(2),g2(2) dimension p1(2),t(6,4),b1(2),b2(2),al1(2),al2(2),g1(2),g2(2)
save save
if(nlin.eq.0) then if(nlin.eq.0) then
...@@ -11,3 +9,5 @@ C { dg-options "-O2 -fgraphite" } ...@@ -11,3 +9,5 @@ C { dg-options "-O2 -fgraphite" }
endif endif
end end
! { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" { xfail *-*-* } } }
! { dg-final { cleanup-tree-dump "graphite" } }
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