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]

[PATCH, commited] add log1p, fmod and drem tests to testsuite


Roger Sayle wrote:

Could you also add test cases to both i386-387-5.c and i386-387-6.c in
testsuite/gcc.dg to check whether _log1p is being called without
-ffast-math, and uses fyl2xp1 otherwise? Normally, these would go in
i386-387-1.c and i386-387-2.c, but x87 intrinsics that clash with the
existing tests, i.e. for "fyl2x", should be placed in 5/6. Likewise,
could you add tests for fmod and drem which check for fprem and fprem1.
One should go in 1/2 and the other in 5/6.


Of course. I have forgot, that new instructions should also be tested...

2004-05-07 Uros Bizjak <uros@kss-loka.si>

   * gcc.dg/i386-387-1.c: Add new test for __builtin_fmod.
   * gcc.dg/i386-387-2.c: Likewise.

   * gcc.dg/i386-387-5.c: Add new tests for __builtin_log1p and
   __builtin_drem.
   * gcc.dg/i386-387-6.c: Likewise.

Uros.

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.3725
diff -u -r1.3725 ChangeLog
--- ChangeLog	7 May 2004 05:38:20 -0000	1.3725
+++ ChangeLog	7 May 2004 05:53:01 -0000
@@ -1,5 +1,14 @@
 2004-05-07  Uros Bizjak  <uros@kss-loka.si>
 
+	* gcc.dg/i386-387-1.c: Add new test for __builtin_fmod.
+	* gcc.dg/i386-387-2.c: Likewise.
+
+	* gcc.dg/i386-387-5.c: Add new tests for __builtin_log1p and
+	__builtin_drem.
+	* gcc.dg/i386-387-6.c: Likewise.
+
+2004-05-07  Uros Bizjak  <uros@kss-loka.si>
+
 	* gcc.dg/builtins-33.c:  Also check log1p*.
 
 2004-05-07  Hans-Peter Nilsson  <hp@axis.com>
Index: gcc.dg/i386-387-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/i386-387-1.c,v
retrieving revision 1.8
diff -u -r1.8 i386-387-1.c
--- gcc.dg/i386-387-1.c	14 Apr 2004 02:37:29 -0000	1.8
+++ gcc.dg/i386-387-1.c	7 May 2004 05:53:04 -0000
@@ -8,6 +8,7 @@
 /* { dg-final { scan-assembler "call\t_?log" } } */
 /* { dg-final { scan-assembler "call\t_?exp" } } */
 /* { dg-final { scan-assembler "call\t_?tan" } } */
+/* { dg-final { scan-assembler "call\t_?fmod" } } */
 
 double f1(double x) { return __builtin_sin(x); }
 double f2(double x) { return __builtin_cos(x); }
@@ -16,3 +17,4 @@
 double f5(double x) { return __builtin_log(x); }
 double f6(double x) { return __builtin_exp(x); }
 double f7(double x) { return __builtin_tan(x); }
+double f8(double x, double y) { return __builtin_fmod(x,y); }
Index: gcc.dg/i386-387-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/i386-387-2.c,v
retrieving revision 1.6
diff -u -r1.6 i386-387-2.c
--- gcc.dg/i386-387-2.c	14 Apr 2004 02:37:29 -0000	1.6
+++ gcc.dg/i386-387-2.c	7 May 2004 05:53:04 -0000
@@ -8,6 +8,7 @@
 /* { dg-final { scan-assembler "fyl2x" } } */
 /* { dg-final { scan-assembler "f2xm1" } } */
 /* { dg-final { scan-assembler "fptan" } } */
+/* { dg-final { scan-assembler "fprem" } } */
 
 double f1(double x) { return __builtin_sin(x); }
 double f2(double x) { return __builtin_cos(x); }
@@ -16,3 +17,4 @@
 double f5(double x) { return __builtin_log(x); }
 double f6(double x) { return __builtin_exp(x); }
 double f7(double x) { return __builtin_tan(x); }
+double f8(double x, double y) { return __builtin_fmod(x,y); }
Index: gcc.dg/i386-387-5.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/i386-387-5.c,v
retrieving revision 1.2
diff -u -r1.2 i386-387-5.c
--- gcc.dg/i386-387-5.c	30 Jul 2003 22:48:45 -0000	1.2
+++ gcc.dg/i386-387-5.c	7 May 2004 05:53:04 -0000
@@ -2,6 +2,9 @@
 /* { dg-do compile { target "i?86-*-*" } } */
 /* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */
 /* { dg-final { scan-assembler "call\t_?atan" } } */
+/* { dg-final { scan-assembler "call\t_?log1p" } } */
+/* { dg-final { scan-assembler "call\t_?drem" } } */
 
 double f1(double x) { return __builtin_atan(x); }
-
+double f2(double x) { return __builtin_log1p(x); }
+double f3(double x, double y) { return __builtin_drem(x,y); }
Index: gcc.dg/i386-387-6.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/i386-387-6.c,v
retrieving revision 1.1
diff -u -r1.1 i386-387-6.c
--- gcc.dg/i386-387-6.c	16 Jun 2003 12:53:16 -0000	1.1
+++ gcc.dg/i386-387-6.c	7 May 2004 05:53:04 -0000
@@ -2,5 +2,9 @@
 /* { dg-do compile { target "i?86-*-*" } } */
 /* { dg-options "-O -ffast-math -mfpmath=387 -march=i686 -mno-fancy-math-387" } */
 /* { dg-final { scan-assembler "fpatan" } } */
+/* { dg-final { scan-assembler "fyl2xp1" } } */
+/* { dg-final { scan-assembler "fprem1" } } */
 
 double f1(double x) { return __builtin_atan(x); }
+double f2(double x) { return __builtin_log1p(x); }
+double f3(double x, double y) { return __builtin_drem(x,y); }

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