public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* A new test case for PPro (update)
@ 1998-03-13 18:29 H.J. Lu
  1998-03-16 20:04 ` Jim Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 1998-03-13 18:29 UTC (permalink / raw)
  To: michaelh; +Cc: egcs

Forwarded message:
> From hjl Thu Mar 12 12:37:11 1998
> Subject: A new test case for PPro
> To: egcs@cygnus.com
> Date: Thu, 12 Mar 1998 12:37:11 -0800 (PST)
> X-Mailer: ELM [version 2.4 PL25 PGP2]
> MIME-Version: 1.0
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
> Content-Length: 1483      
> 
> Hi,
> 
> This is a new test case on PPro, which is derived from egcs/f77 on
> glibc 2.1.
> 
> 
> -- 
> H.J. Lu (hjl@gnu.org)
> --
> Sat Mar  7 12:33:06 1998  H.J. Lu  (hjl@gnu.org)
> 
> 	* gcc.dg/980307-1.c: New to test fp on PPro.
> 

Please use this test, instead of gcc.dg/980307-1.c. It is caused by
both the conditional move and the standard x87 fp constants. See
standard_80387_constant_p () for the standard x87 fp constants.

Thanks.


H.J.
---
Fri Mar 13 08:42:28 1998  H.J. Lu  (hjl@gnu.org)

	* gcc.dg/980313-1.c: New to test fp on PPro.

--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-1.c	Fri Mar 13 08:41:28 1998
@@ -0,0 +1,21 @@
+/* { dg-do compile { target i?86-*-* } } */
+/* { dg-options "-O2 -mach=pentiumpro" } */
+
+extern __inline  double
+__expm1 (double __x)
+{
+  double __temp;
+  __temp -= 1.0;
+  return __temp;
+}
+extern __inline  double
+__sgn1 (double __x)
+{
+  return __x >= 0.0 ? 1.0 : -1.0;
+}
+double
+tanh (double __x)
+{
+  register double __exm1 = __expm1 (__x);
+  return __exm1 / (__exm1 + 2.0) * __sgn1 (-__x);
+}

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A new test case for PPro (update)
  1998-03-13 18:29 A new test case for PPro (update) H.J. Lu
@ 1998-03-16 20:04 ` Jim Wilson
  1998-03-18 16:14   ` H.J. Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Wilson @ 1998-03-16 20:04 UTC (permalink / raw)
  To: H.J. Lu; +Cc: michaelh, egcs

I don't see the need for this testcase.  This is testing the exact same
bug as the previous testcase, 980312-1.c.  There is no need to have two
testcases for just one bug.

Jim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A new test case for PPro (update)
  1998-03-18 16:14   ` H.J. Lu
@ 1998-03-18 14:08     ` Jim Wilson
  1998-03-18 16:14       ` H.J. Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Wilson @ 1998-03-18 14:08 UTC (permalink / raw)
  To: H.J. Lu; +Cc: egcs

	There are more than one bugs on PPro.

There are two bugs, the reg-stack bug and the i386.md bug.

The i386.md bug can be reproduced by many different testcases, but it is
still only one bug, and only needs one testcase.

If you could submit a testcase for the reg-stack bug, that would be useful.

I really prefer to only add one testcase per bug, because over time the
testsuite will only get larger and larger, and if we add too many unnecessary
testcases now, the testsuite may be too large and too slow in the future.

Jim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A new test case for PPro (update)
  1998-03-16 20:04 ` Jim Wilson
@ 1998-03-18 16:14   ` H.J. Lu
  1998-03-18 14:08     ` Jim Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 1998-03-18 16:14 UTC (permalink / raw)
  To: Jim Wilson; +Cc: egcs

> 
> I don't see the need for this testcase.  This is testing the exact same
> bug as the previous testcase, 980312-1.c.  There is no need to have two
> testcases for just one bug.
> 
> Jim
> 

There are more than one bugs on PPro. Here are the revised
test cases plus a patch to gcc.dg/980312-1.c. They
test inlined/nested functions with different combinations.

BTW, with my reg-stack.c patch, even when compile passes, but
link may fail. Your i386.md patch fixes the link part as
well as some compile.

-- 
H.J. Lu (hjl@gnu.org)
----
Tue Mar 17 08:14:21 1998  H.J. Lu  (hjl@gnu.org)

	* gcc.dg/980313-1.c: New to test fp on PPro.
	* gcc.dg/980313-2.c: Likewise.
	* gcc.dg/980313-3.c: Likewise.
	* gcc.dg/980313-4.c: Likewise.

Tue Mar 17 07:49:59 1998  H.J. Lu  (hjl@gnu.org)

	* gcc.dg/980312-1.c: Fix a typo.
	Do link instead of compile.

Index: gcc.dg/980312-1.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/testsuite/gcc.dg/980312-1.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 980312-1.c
--- gcc.dg/980312-1.c	1998/03/17 17:31:33	1.1.1.1
+++ gcc.dg/980312-1.c	1998/03/17 19:13:07
@@ -1,5 +1,5 @@
-/* { dg-do compile { target i?86-*-* } } */
-/* { dg-options "-O2 -mach=pentiumpro" } */
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
 
 extern __inline  double
 __expm1 (double __x)
@@ -17,4 +17,8 @@
 tanh (double __x)
 {
   return  __expm1 (__x) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
 }
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-1.c	Tue Mar 17 11:13:10 1998
@@ -0,0 +1,25 @@
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+extern __inline  double
+__expm1 (double __x)
+{
+  double __temp;
+  __temp -= 1.0;
+  return __temp;
+}
+extern __inline  double
+__sgn1 (double __x)
+{
+  return __x >= 0.0 ? 1.0 : -1.0;
+}
+double
+tanh (double __x)
+{
+  register double __exm1 = __expm1 (__x);
+  return __exm1 / (__exm1 + 2.0) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-2.c	Tue Mar 17 11:13:14 1998
@@ -0,0 +1,25 @@
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+double
+tanh (double __x)
+{
+  double inline __expm1 (double __x)
+  {
+    double __temp;
+    __temp -= 1.0;
+    return __temp;
+  }
+
+  double inline __sgn1 (double __x)
+  {
+    return __x >= 0.0 ? 1.0 : -1.0;
+  }
+
+  double __exm1 = __expm1 (__x);
+  return __exm1 / (__exm1 + 2.0) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-3.c	Tue Mar 17 11:13:18 1998
@@ -0,0 +1,23 @@
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+double
+tanh (double __x)
+{
+  double __expm1 (double __x)
+  {
+    double __temp;
+    __temp = 1.0;
+    return __temp;
+  }
+  double __sgn1 (double __x)
+  {
+  return __x >= 0.0 ? 1.0 : -1.0;
+  }
+
+  return  __expm1 (__x) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-4.c	Tue Mar 17 11:13:23 1998
@@ -0,0 +1,23 @@
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+double
+tanh (double __x)
+{
+  double inline __expm1 (double __x)
+  {
+    double __temp;
+    __temp = 1.0;
+    return __temp;
+  }
+  double  inline __sgn1 (double __x)
+  {
+  return __x >= 0.0 ? 1.0 : -1.0;
+  }
+
+  return  __expm1 (__x) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A new test case for PPro (update)
  1998-03-18 14:08     ` Jim Wilson
@ 1998-03-18 16:14       ` H.J. Lu
  0 siblings, 0 replies; 5+ messages in thread
From: H.J. Lu @ 1998-03-18 16:14 UTC (permalink / raw)
  To: Jim Wilson; +Cc: egcs, scox

> 
> 	There are more than one bugs on PPro.
> 
> There are two bugs, the reg-stack bug and the i386.md bug.
> 
> The i386.md bug can be reproduced by many different testcases, but it is
> still only one bug, and only needs one testcase.
> 

There are more bugs than I thought. Here is the test case I sent
you earlier today. I believe Stan had a reason to keep the way
it was in i386.md. This bug may be in i386.md, reload and/or
local/global register allocation. 


-- 
H.J. Lu (hjl@gnu.org)
----
typedef double real;
typedef struct { real r, i; } complex;
extern __inline double        sin    (  double   __x)
{
  register   double   __result;
  __asm __volatile__ (      "fsin"    : "=t" (__result) :   "0" (__x) );
  return __result;
}
extern __inline    double    __sgn1l  (  double    __x )
{
  return __x >= 0.0 ? 1.0 : -1.0;
}
extern __inline   double     sinh   ( double      __x  )
{
  return __x * __sgn1l (__x);
}
void c_cos(complex *resx, complex *z)
{
resx->i = - sin(z->r) * sinh(z->i);
}

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-03-18 16:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-13 18:29 A new test case for PPro (update) H.J. Lu
1998-03-16 20:04 ` Jim Wilson
1998-03-18 16:14   ` H.J. Lu
1998-03-18 14:08     ` Jim Wilson
1998-03-18 16:14       ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).