vect-16.c: Rename to...
authorIra Rosen <ira.rosen@linaro.org>
Tue, 14 Jun 2011 07:00:37 +0000 (07:00 +0000)
committerIra Rosen <irar@gcc.gnu.org>
Tue, 14 Jun 2011 07:00:37 +0000 (07:00 +0000)
* gcc.dg/vect/vect-16.c: Rename to...
* gcc.dg/vect/no-fast-math-vect16.c: ...this.
* gcc.dg/vect/vect-peel-3.c: Adjust misalignment values
for double-word vectors.
* gcc.dg/vect/vect-peel-4.c: Likewise.
* gcc.dg/vect/bb-slp-10.c: Replace vect_hw_misalign with
vect_element_align.
* gcc.dg/vect/vect.exp: Run no-fast-math-* tests with
-fno-fast-math.

From-SVN: r175009

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/bb-slp-10.c
gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-16.c [deleted file]
gcc/testsuite/gcc.dg/vect/vect-peel-3.c
gcc/testsuite/gcc.dg/vect/vect-peel-4.c
gcc/testsuite/gcc.dg/vect/vect.exp

index 1d9bc22490d47432b63239dc337a72abe6372df1..ea38b829abcd16afb5509efe821f9dda47472bb9 100644 (file)
@@ -1,3 +1,15 @@
+2011-06-14  Ira Rosen  <ira.rosen@linaro.org>
+
+       * gcc.dg/vect/vect-16.c: Rename to...
+       * gcc.dg/vect/no-fast-math-vect16.c: ...this.
+       * gcc.dg/vect/vect-peel-3.c: Adjust misalignment values
+       for double-word vectors.
+       * gcc.dg/vect/vect-peel-4.c: Likewise.
+       * gcc.dg/vect/bb-slp-10.c: Replace vect_hw_misalign with
+       vect_element_align.
+       * gcc.dg/vect/vect.exp: Run no-fast-math-* tests with
+       -fno-fast-math.
+
 2011-06-13  Edmar Wienskoski  <edmar@freescale.com>
 
        * gcc.target/powerpc/outofline_rnreg.c: New testcase.
index 014f80f8a7ec37d9242bf36473f543d23115a37f..f127c7f11effd4cb4fc95c77a89036eae128ad4e 100644 (file)
@@ -49,7 +49,7 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "unsupported alignment in basic block." 1 "slp" { xfail vect_hw_misalign } } } */
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_hw_misalign } } } */
+/* { dg-final { scan-tree-dump-times "unsupported alignment in basic block." 1 "slp" { xfail vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
 /* { dg-final { cleanup-tree-dump "slp" } } */
   
diff --git a/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c b/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c
new file mode 100644 (file)
index 0000000..6983705
--- /dev/null
@@ -0,0 +1,38 @@
+/* { dg-require-effective-target vect_float } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 16
+#define DIFF 240
+
+__attribute__ ((noinline))
+int main1 ()
+{
+  int i;
+  float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+  float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+  float diff;
+
+  diff = 0;
+  for (i = 0; i < N; i++) {
+    diff += (b[i] - c[i]);
+  }
+
+  /* check results:  */
+  if (diff != DIFF)
+    abort ();
+
+  return 0;
+}
+
+int main (void)
+{ 
+  check_vect ();
+  
+  return main1 ();
+}
+
+/* Requires fast-math.  */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-16.c b/gcc/testsuite/gcc.dg/vect/vect-16.c
deleted file mode 100644 (file)
index 6983705..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* { dg-require-effective-target vect_float } */
-
-#include <stdarg.h>
-#include "tree-vect.h"
-
-#define N 16
-#define DIFF 240
-
-__attribute__ ((noinline))
-int main1 ()
-{
-  int i;
-  float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
-  float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
-  float diff;
-
-  diff = 0;
-  for (i = 0; i < N; i++) {
-    diff += (b[i] - c[i]);
-  }
-
-  /* check results:  */
-  if (diff != DIFF)
-    abort ();
-
-  return 0;
-}
-
-int main (void)
-{ 
-  check_vect ();
-  
-  return main1 ();
-}
-
-/* Requires fast-math.  */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { cleanup-tree-dump "vect" } } */
index bc8adb4600856659e260680d4ba9963eaaf02747..5049b40b1069ca51cb393554cb0f6a83d068c869 100644 (file)
@@ -4,9 +4,7 @@
 #include "tree-vect.h"
 
 #define N 128
-#define RES 21888 
-
-/* unaligned store.  */
+#define RES 21640 
 
 int ib[N+10];
 int ia[N+10];
@@ -18,11 +16,11 @@ int main1 ()
   int i, suma = 0, sumb = 0, sumc = 0;
 
   /* ib and ic have same misalignment, we peel to align them.  */
-  for (i = 1; i <= N; i++)
+  for (i = 0; i <= N; i++)
     {
       suma += ia[i];
-      sumb += ib[i+6];
-      sumc += ic[i+2];
+      sumb += ib[i+5];
+      sumc += ic[i+1];
     }
 
   /* check results:  */
index a71d4c4eba0f94f778b90738f8879cb7109d943c..a52075e34ac9daeb98957f571b07e1514fd4a5d9 100644 (file)
@@ -16,13 +16,13 @@ int main1 ()
   /* Don't peel keeping one load and the store aligned.  */
   for (i = 0; i <= N; i++)
     {
-      ia[i] = ib[i] + ib[i+6];
+      ia[i] = ib[i] + ib[i+5];
     }
 
   /* check results:  */
   for (i = 1; i <= N; i++)
     {
-      if (ia[i] != ib[i] + ib[i+6])
+      if (ia[i] != ib[i] + ib[i+5])
         abort ();
     }
 
index e0821d0f514b754220ae074743a687349a9ef8ef..fd92da8707c0e855480d4ab7c99cad94a79eb5cc 100644 (file)
@@ -107,6 +107,12 @@ lappend DEFAULT_VECTCFLAGS "-ffast-math"
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/fast-math-*.\[cS\]]]  \
        "" $DEFAULT_VECTCFLAGS
 
+# -fno-fast-math tests
+set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
+lappend DEFAULT_VECTCFLAGS "-fno-fast-math"
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-fast-math-*.\[cS\]]]  \
+        "" $DEFAULT_VECTCFLAGS
+
 # -fno-math-errno tests
 set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
 lappend DEFAULT_VECTCFLAGS "-fno-math-errno"