This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testcase] Tests for the SSE patch Jan commited today


Hi!

Ok to commited the following tests fixed by Jan's patch commited today?

2002-04-18  Jakub Jelinek  <jakub@redhat.com>

	* gcc.dg/20020418-1.c: New test.
	* gcc.dg/20020418-2.c: New test.

--- gcc/testsuite/gcc.dg/20020418-1.c.jj	Thu Apr 18 18:59:04 2002
+++ gcc/testsuite/gcc.dg/20020418-1.c	Thu Apr 18 18:58:56 2002
@@ -0,0 +1,26 @@
+/* PR optimization/5887 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -msse -ffast-math" { target i?86-*-* } } */
+
+void bar (float *a, float *b);
+
+void foo (char *x)
+{
+  float a, b;
+  char c[256];
+  int i, j;
+
+  bar (&a, &b);
+  for (i = 0; i < 256; i++)
+    {
+      float v = a;
+      if (v < 0.0f) v = 0.0f;
+      if (v < 255.0f) v = 255.0f;
+      c[i] = v;
+      a += b;
+    }
+
+  for (j = 0; j < 256; j++)
+    x[j] = c[j];
+}
--- gcc/testsuite/gcc.dg/20020418-2.c.jj	Thu Apr 18 19:00:50 2002
+++ gcc/testsuite/gcc.dg/20020418-2.c	Thu Apr 18 15:05:02 2002
@@ -0,0 +1,21 @@
+/* PR optimization/6010 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -funroll-all-loops" } */
+/* { dg-options "-O2 -funroll-all-loops -march=pentium3" { target i?86-*-* } } */
+
+void bar (float);
+
+void foo (float y, unsigned long z)
+{
+  int b;
+  float c = y;
+
+  for (b = 0; b < z; b++)
+    {
+      bar (c);
+      if (c == y)
+	c = -y;
+      else
+	c = y;
+    }
+}

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]