diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-30 21:16:34 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-30 21:16:34 +0000 |
commit | 650f242079e77dc3244cef1fc084167e3c4347f6 (patch) | |
tree | d7aa01180bd3cf60c95eae3918d1089352e91d07 /gcc/testsuite/gcc.dg/graphite | |
parent | be90fd3f09b9f10addce3cdaecea2a16d47b47cd (diff) | |
download | gcc-650f242079e77dc3244cef1fc084167e3c4347f6.tar.gz |
Add testcase for PR43423.
2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
* gfortran.dg/graphite/graphite.exp: Same.
* gcc.dg/graphite/vect-pr43423.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164773 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/graphite')
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/graphite.exp | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/vect-pr43423.c | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp index 411e0417afd..e6cdf12ed95 100644 --- a/gcc/testsuite/gcc.dg/graphite/graphite.exp +++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp @@ -43,11 +43,13 @@ set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ] set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ] set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c ] ] set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.c ] ] +set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.c ] ] # Tests to be compiled. set dg-do-what-default compile dg-runtest $scop_files "" "-O2 -fgraphite -fdump-tree-graphite-all" dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math" +dg-runtest $vect_files "" "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" # Tests to be run. set dg-do-what-default run @@ -62,6 +64,7 @@ foreach f $id_files {lremove wait_to_run_files $f} foreach f $run_id_files {lremove wait_to_run_files $f} foreach f $interchange_files {lremove wait_to_run_files $f} foreach f $block_files {lremove wait_to_run_files $f} +foreach f $vect_files {lremove wait_to_run_files $f} dg-runtest $wait_to_run_files "" "-ansi -pedantic-errors" # Clean up. diff --git a/gcc/testsuite/gcc.dg/graphite/vect-pr43423.c b/gcc/testsuite/gcc.dg/graphite/vect-pr43423.c new file mode 100644 index 00000000000..5589167fbd3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/vect-pr43423.c @@ -0,0 +1,18 @@ +/* { dg-require-effective-target vect_int } */ + +int a[100], b[100], c[100]; + +void foo(int n, int mid) +{ + int i; + for(i=0; i<n; i++) + { + if (i < mid) + a[i] = a[i] + b[i]; + else + a[i] = a[i] + c[i]; + } +} + +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ |