]> gcc.gnu.org Git - gcc.git/commitdiff
Add testcase for PR43423.
authorSebastian Pop <sebastian.pop@amd.com>
Thu, 30 Sep 2010 21:16:34 +0000 (21:16 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Thu, 30 Sep 2010 21:16:34 +0000 (21:16 +0000)
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.

From-SVN: r164773

gcc/ChangeLog.graphite
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/graphite.exp
gcc/testsuite/gcc.dg/graphite/vect-pr43423.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/graphite.exp

index b469a1297c80208f457d04c0e36c362e2b58e9b7..7083e7bbaddf2e81d3078bfa728bc63ea2a60011 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
 
        * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
index e3ffb188d8b4eebc1cacfc3d8d254015d26eaf15..f5b2a74a09d9bfee3360c40d1319f5cce8931dcf 100644 (file)
@@ -1,3 +1,9 @@
+2010-09-30  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.
+
 2010-09-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/45843
index 411e0417afd7f99ee4e9f5fc7d3bde96d9badff1..e6cdf12ed95d00636b0eb69f75802d70381e3f84 100644 (file)
@@ -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 (file)
index 0000000..5589167
--- /dev/null
@@ -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" } } */
index 11dd42dc57eb38e5cc0c7ac8f6a6cfa3ff97fa46..4ca881ded79acac5b4c270ecbf7dd4055f8553c5 100644 (file)
@@ -41,8 +41,9 @@ set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,0
 set block_files       [lsort [glob -nocomplain $srcdir/$subdir/block-*.\[fF\]{,90,95,03,08} ] ]
 set id_files          [lsort [glob -nocomplain $srcdir/$subdir/id-*.\[fF\]{,90,95,03,08} ] ]
 set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.\[fF\]{,90,95,03,08} ] ]
-set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.\[fF\]{,90,95,03,08} ] ]
-set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.\[fF\]{,90,95,03,08} ] ]
+set scop_files        [lsort [glob -nocomplain $srcdir/$subdir/scop-*.\[fF\]{,90,95,03,08} ] ]
+set run_id_files      [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.\[fF\]{,90,95,03,08} ] ]
+set vect_files        [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90,95,03,08} ] ]
 
 # Tests to be compiled.
 set dg-do-what-default compile
@@ -50,6 +51,7 @@ gfortran-dg-runtest $scop_files        "-O2 -fgraphite -fdump-tree-graphite-all"
 gfortran-dg-runtest $id_files          "-O2 -fgraphite-identity -ffast-math"
 gfortran-dg-runtest $interchange_files "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
 gfortran-dg-runtest $block_files       "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
+gfortran-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 $interchange_files {lremove wait_to_run_files $f}
 foreach f $scop_files        {lremove wait_to_run_files $f}
 foreach f $run_id_files      {lremove wait_to_run_files $f}
+foreach f $vect_files        {lremove wait_to_run_files $f}
 gfortran-dg-runtest $wait_to_run_files ""
 
 # Clean up.
This page took 0.11011 seconds and 5 git commands to generate.