public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Updating glibc mathinlines.h to reflect additional GCC builtins ?
@ 2004-09-24  6:38 Kaveh R. Ghazi
  2004-09-24  6:56 ` Uros Bizjak
  0 siblings, 1 reply; 6+ messages in thread
From: Kaveh R. Ghazi @ 2004-09-24  6:38 UTC (permalink / raw)
  To: jakub, uros; +Cc: gcc, libc-hacker

Jakub,

I'm looking over sysdeps/i386/fpu/bits/mathinline.h
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/fpu/bits/mathinline.h?cvsroot=glibc

and the changes you made here:
http://sources.redhat.com/ml/libc-hacker/2004-05/msg00048.html

I think we might be able to use a few more GCC builtins for gcc-3.5+.

Looking through mathinline.h and cross referencing it with gcc, I
think the following additional builtins might be usable:

pow2 (-> __builtin_exp2 ?)
sincos (?)
floor
ceil
rint

(Uros, does this match what you implemented in GCC in the last few
 months?  Have I missed any?)


Jakub, would you consider updating mathinlines.h to reflect that these
work also?  (I don't have hardware access to test it myself.)

		Thanks,
		--Kaveh


PS: We could use someone to implement the following for gcc-4.1 ;-)

signbit (done http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02499.html )
sgn
sinh
cosh
tanh
ldexp
asinh
acosh
atanh
fma
hypot
lrint
llrint
finite
coshm1
acosh1p

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

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

* Re: Updating glibc mathinlines.h to reflect additional GCC builtins ?
  2004-09-24  6:38 Updating glibc mathinlines.h to reflect additional GCC builtins ? Kaveh R. Ghazi
@ 2004-09-24  6:56 ` Uros Bizjak
  2004-09-24 11:23   ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Uros Bizjak @ 2004-09-24  6:56 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: jakub, gcc, libc-hacker

Kaveh R. Ghazi wrote:

>Looking through mathinline.h and cross referencing it with gcc, I
>think the following additional builtins might be usable:
>
>pow2 (-> __builtin_exp2 ?)
>sincos (?)
>floor
>ceil
>rint
>
>(Uros, does this match what you implemented in GCC in the last few
> months?  Have I missed any?)
>  
>
nearbyint() is also implemented as builtin.

Regarding sincos(), a patch was submitted to gcc-patches 
(http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00555.html). It used 
soon-to-be-obsoleted ADDRESSOF optimization in sincos expander 
(http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00653.html), so it was not 
commited to CVS. As fsincos is generated automatically, it was somehow 
put on hold...

>ldexp
>  
>
ldexp needs an expander and perhaps an expand_twoval_unop() which would 
handle (double),(int) combination.
frexp also needs the same expander, but as in sincos case, without 
ADDRESSOF optimization.

>fma
>hypot
>  
>
fma and hypot were discussed in length here: 
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00385.html. However, they 
could stay  as inline function (explanation is below).

>lrint
>llrint
>  
>
The patterns to implement this function would be actually the same as 
patterns to implement fix_trunc* insn. With current infrastructure, the 
only difference from fix_trunc* for x86 would be an  (set_attr "i387_cw" 
"any") instead of  (set_attr "i387_cw" "trunc"). However, whole block of 
fix_trunc* patterns would have to be copied - perhaps this could be 
implemented with more elegance by using new macro stuff?

OTOH, infrastructure allows us to implement BUILT_IN_LCEIL, 
BUILT_IN_LLCEIL, BUILT_IN_LFLOOR, etc... to optimize an `(int) floor()` 
construct. Again just by changing a value of "i387_cw" attribute. Of 
course, some help from midlevel would be needed to transform (int) 
floor() into BUILT_IN_LFLOOR, just like (int) rint() is transformed into 
BUILT_IN_LRINT. And SSE instructions could be plugged into this scheme - 
by adding "sse_*" values (with appropriate control word handling) to 
i387_cw attribute [well, we shouldn't call it i387_cw in this case ;> ]. 
Unfortunatelly, this is 4.1 stuff...

Regarding hyperbolic functions (and perhaps fma and hypot): they are 
implemented as ordinary math on "leaf" functions, and RTL optimizers 
optimize these as if they were written in the form of RTL patterns. I 
think that these functions should remain in their current form as 
inlined functions. However, sgn/sgn1 should be implemented as "leaf" RTL 
pattern for them.

Basically, everything is already implemented, just some "glue logic" is 
missing.

Uros.

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

* Re: Updating glibc mathinlines.h to reflect additional GCC builtins ?
  2004-09-24  6:56 ` Uros Bizjak
@ 2004-09-24 11:23   ` Paolo Bonzini
  2004-09-24 11:29     ` Paolo Bonzini
  2004-09-25 11:54     ` Giovanni Bajo
  0 siblings, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2004-09-24 11:23 UTC (permalink / raw)
  To: gcc; +Cc: jakub, gcc, libc-hacker

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

> Regarding sincos(), a patch was submitted to gcc-patches 
> (http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00555.html). It used 
> soon-to-be-obsoleted ADDRESSOF optimization in sincos expander 
> (http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00653.html), so it was not 
> commited to CVS. As fsincos is generated automatically, it was somehow 
> put on hold...

Just FYI (I don't think this is appropriate for stage3, and I haven't 
bootstrapped/regtested it yet), here is a patch that does what I 
suggested in the message Uros cited above.

Some magic is needed to avoid bad interaction with the cos (-x) => cos 
(x) optimization, but the patch is quite simple.

Paolo

2004-09-24  Paolo Bonzini  <bonzini@gnu.org>

	* builtins.c (fold_builtin_sincos): New.
	(fold_builtin): Call it.

2004-09-24  Paolo Bonzini  <bonzini@gnu.org>

	* gcc.dg/i386-387-9.c, gcc.dg/builtins-47.c: New testcases.


[-- Attachment #2: fold-builtin-sincos.patch --]
[-- Type: text/plain, Size: 5692 bytes --]

Index: testsuite/gcc.dg/builtins-47.c
===================================================================
RCS file: testsuite/gcc.dg/builtins-47.c
diff -N testsuite/gcc.dg/builtins-47.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/builtins-47.c	24 Sep 2004 08:35:35 -0000
@@ -0,0 +1,43 @@
+/* Copyright (C) 2004 Free Software Foundation.
+
+   Check that the sincos, sincosf, sincosl
+   built-in functions compile.
+
+   Written by Paolo Bonzini, 24th Sep 2004.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math" } */
+
+float sf, cf;
+double sd, cd;
+long double sl, cl;
+
+void f1 (float x)
+{
+  __builtin_sincosf (x, &sf, &cf);
+};
+
+void f2 (double x)
+{
+  __builtin_sincos (x, &sd, &cd);
+};
+
+void f3 (long double x)
+{
+  __builtin_sincosl (x, &sl, &cl);
+};
+
+void g1 (float x)
+{
+  __builtin_sincosf (-x, &sf, &cf);
+};
+
+void g2 (double x)
+{
+  __builtin_sincos (-x, &sd, &cd);
+};
+
+void g3 (long double x)
+{
+  __builtin_sincosl (-x, &sl, &cl);
+};
Index: testsuite/gcc.dg/i386-387-9.c
===================================================================
RCS file: testsuite/gcc.dg/i386-387-9.c
diff -N testsuite/gcc.dg/i386-387-9.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/i386-387-9.c	24 Sep 2004 08:35:35 -0000
@@ -0,0 +1,39 @@
+/* Verify that 387 fsincos instruction is generated from __builtin_sincos.  */
+/* { dg-do compile { target "i?86-*-*" } } */
+/* { dg-options "-O2 -ffast-math -march=i686" } */
+/* { dg-final { scan-assembler "fsincos" } } */
+/* { dg-final { scan-assembler-not "call" } } */
+
+float sf, cf;
+double sd, cd;
+long double sl, cl;
+
+void f1 (float x)
+{
+  __builtin_sincosf (x, &sf, &cf);
+};
+
+void f2 (double x)
+{
+  __builtin_sincos (x, &sd, &cd);
+};
+
+void f3 (long double x)
+{
+  __builtin_sincosl (x, &sl, &cl);
+};
+
+void g1 (float x)
+{
+  __builtin_sincosf (-x, &sf, &cf);
+};
+
+void g2 (double x)
+{
+  __builtin_sincos (-x, &sd, &cd);
+};
+
+void g3 (long double x)
+{
+  __builtin_sincosl (-x, &sl, &cl);
+};
Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.387
diff -u -p -r1.387 builtins.c
--- builtins.c	23 Sep 2004 06:16:08 -0000	1.387
+++ builtins.c	24 Sep 2004 08:35:37 -0000
@@ -154,6 +154,7 @@ static tree fold_builtin_cbrt (tree, tre
 static tree fold_builtin_pow (tree, tree, tree);
 static tree fold_builtin_sin (tree);
 static tree fold_builtin_cos (tree, tree, tree);
+static tree fold_builtin_sincos (tree, tree);
 static tree fold_builtin_tan (tree);
 static tree fold_builtin_atan (tree, tree);
 static tree fold_builtin_trunc (tree);
@@ -6757,6 +6758,82 @@ fold_builtin_cos (tree arglist, tree typ
   return NULL_TREE;
 }
 
+/* Fold function call to builtin cos, cosf, or cosl.  Return
+   NULL_TREE if no simplification can be made.  */
+static tree
+fold_builtin_sincos (tree arglist, tree fndecl)
+{
+  tree arg, arg1, arg2, sin_fn, cos_fn, sin_modify, cos_modify;
+  tree sin_fndecl, cos_fndecl;
+  enum machine_mode mode;
+  bool negate_sin;
+
+  if (!validate_arglist (arglist,
+			 REAL_TYPE, POINTER_TYPE, POINTER_TYPE, VOID_TYPE))
+    return NULL_TREE;
+
+  /* Check if sincos insn is available, otherwise fallback
+     to usual builtin.  */
+  arg = TREE_VALUE (arglist);
+  mode = TYPE_MODE (TREE_TYPE (arg));
+  if (sincos_optab->handlers[(int) mode].insn_code == CODE_FOR_nothing)
+    return NULL_TREE;
+
+  switch (DECL_FUNCTION_CODE (fndecl))
+    {
+    case BUILT_IN_SINCOS:
+      sin_fndecl = implicit_built_in_decls[BUILT_IN_SIN];
+      cos_fndecl = implicit_built_in_decls[BUILT_IN_COS];
+      break;
+
+    case BUILT_IN_SINCOSF:
+      sin_fndecl = implicit_built_in_decls[BUILT_IN_SINF];
+      cos_fndecl = implicit_built_in_decls[BUILT_IN_COSF];
+      break;
+
+    case BUILT_IN_SINCOSL:
+      sin_fndecl = implicit_built_in_decls[BUILT_IN_SINL];
+      cos_fndecl = implicit_built_in_decls[BUILT_IN_COSL];
+      break;
+
+    default:
+      gcc_unreachable ();
+    }
+
+  /* Avoid that cos(-x) is optimized into cos (x) and sincos_optab
+     cannot be used anymore.  */
+  if (TREE_CODE (arg) == NEGATE_EXPR)
+    {
+      arg = TREE_OPERAND (arg, 0);
+      negate_sin = true;
+    }
+  else
+    negate_sin = false;
+
+  arg1 = TREE_VALUE (TREE_CHAIN (arglist));
+  sin_fn = build_function_call_expr (sin_fndecl,
+				     build_tree_list (NULL_TREE, arg));
+  if (negate_sin)
+    sin_fn = build1 (NEGATE_EXPR, TREE_TYPE (sin_fn), sin_fn);
+
+  sin_modify =
+    build2 (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (arg1)),
+	    build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (arg1)), arg1),
+	    fold_convert (TREE_TYPE (TREE_TYPE (arg1)), sin_fn));
+
+  arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
+  cos_fn = build_function_call_expr (cos_fndecl,
+				     build_tree_list (NULL_TREE, arg));
+  cos_modify =
+    build2 (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (arg2)),
+	    build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (arg2)), arg2),
+	    fold_convert (TREE_TYPE (TREE_TYPE (arg2)), cos_fn));
+
+  return build1 (NOP_EXPR, void_type_node,
+		 build2 (COMPOUND_EXPR, TREE_TYPE (sin_modify),
+			 cos_modify, sin_modify));
+}
+
 /* Fold function call to builtin tan, tanf, or tanl.  Return
    NULL_TREE if no simplification can be made.  */
 static tree
@@ -8288,6 +8365,11 @@ fold_builtin_1 (tree exp, bool ignore)
     case BUILT_IN_COSL:
       return fold_builtin_cos (arglist, type, fndecl);
 
+    case BUILT_IN_SINCOS:
+    case BUILT_IN_SINCOSF:
+    case BUILT_IN_SINCOSL:
+      return fold_builtin_sincos (arglist, fndecl);
+
     case BUILT_IN_EXP:
     case BUILT_IN_EXPF:
     case BUILT_IN_EXPL:

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

* Re: Updating glibc mathinlines.h to reflect additional GCC builtins ?
  2004-09-24 11:23   ` Paolo Bonzini
@ 2004-09-24 11:29     ` Paolo Bonzini
  2004-09-25 11:54     ` Giovanni Bajo
  1 sibling, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2004-09-24 11:29 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: jakub, gcc, libc-hacker

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

> Regarding sincos(), a patch was submitted to gcc-patches 
> (http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00555.html). It used 
> soon-to-be-obsoleted ADDRESSOF optimization in sincos expander 
> (http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00653.html), so it was not 
> commited to CVS. As fsincos is generated automatically, it was somehow 
> put on hold...

Just FYI (I don't think this is appropriate for stage3, and I haven't 
bootstrapped/regtested it yet), here is a patch that does what I 
suggested in the message Uros cited above.

Some magic is needed to avoid bad interaction with the cos (-x) => cos 
(x) optimization, but the patch is quite simple.

Paolo

2004-09-24  Paolo Bonzini  <bonzini@gnu.org>

	* builtins.c (fold_builtin_sincos): New.
	(fold_builtin): Call it.

2004-09-24  Paolo Bonzini  <bonzini@gnu.org>

	* gcc.dg/i386-387-9.c, gcc.dg/builtins-47.c: New testcases.


[-- Attachment #2: fold-builtin-sincos.patch --]
[-- Type: text/plain, Size: 5692 bytes --]

Index: testsuite/gcc.dg/builtins-47.c
===================================================================
RCS file: testsuite/gcc.dg/builtins-47.c
diff -N testsuite/gcc.dg/builtins-47.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/builtins-47.c	24 Sep 2004 08:35:35 -0000
@@ -0,0 +1,43 @@
+/* Copyright (C) 2004 Free Software Foundation.
+
+   Check that the sincos, sincosf, sincosl
+   built-in functions compile.
+
+   Written by Paolo Bonzini, 24th Sep 2004.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math" } */
+
+float sf, cf;
+double sd, cd;
+long double sl, cl;
+
+void f1 (float x)
+{
+  __builtin_sincosf (x, &sf, &cf);
+};
+
+void f2 (double x)
+{
+  __builtin_sincos (x, &sd, &cd);
+};
+
+void f3 (long double x)
+{
+  __builtin_sincosl (x, &sl, &cl);
+};
+
+void g1 (float x)
+{
+  __builtin_sincosf (-x, &sf, &cf);
+};
+
+void g2 (double x)
+{
+  __builtin_sincos (-x, &sd, &cd);
+};
+
+void g3 (long double x)
+{
+  __builtin_sincosl (-x, &sl, &cl);
+};
Index: testsuite/gcc.dg/i386-387-9.c
===================================================================
RCS file: testsuite/gcc.dg/i386-387-9.c
diff -N testsuite/gcc.dg/i386-387-9.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/i386-387-9.c	24 Sep 2004 08:35:35 -0000
@@ -0,0 +1,39 @@
+/* Verify that 387 fsincos instruction is generated from __builtin_sincos.  */
+/* { dg-do compile { target "i?86-*-*" } } */
+/* { dg-options "-O2 -ffast-math -march=i686" } */
+/* { dg-final { scan-assembler "fsincos" } } */
+/* { dg-final { scan-assembler-not "call" } } */
+
+float sf, cf;
+double sd, cd;
+long double sl, cl;
+
+void f1 (float x)
+{
+  __builtin_sincosf (x, &sf, &cf);
+};
+
+void f2 (double x)
+{
+  __builtin_sincos (x, &sd, &cd);
+};
+
+void f3 (long double x)
+{
+  __builtin_sincosl (x, &sl, &cl);
+};
+
+void g1 (float x)
+{
+  __builtin_sincosf (-x, &sf, &cf);
+};
+
+void g2 (double x)
+{
+  __builtin_sincos (-x, &sd, &cd);
+};
+
+void g3 (long double x)
+{
+  __builtin_sincosl (-x, &sl, &cl);
+};
Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.387
diff -u -p -r1.387 builtins.c
--- builtins.c	23 Sep 2004 06:16:08 -0000	1.387
+++ builtins.c	24 Sep 2004 08:35:37 -0000
@@ -154,6 +154,7 @@ static tree fold_builtin_cbrt (tree, tre
 static tree fold_builtin_pow (tree, tree, tree);
 static tree fold_builtin_sin (tree);
 static tree fold_builtin_cos (tree, tree, tree);
+static tree fold_builtin_sincos (tree, tree);
 static tree fold_builtin_tan (tree);
 static tree fold_builtin_atan (tree, tree);
 static tree fold_builtin_trunc (tree);
@@ -6757,6 +6758,82 @@ fold_builtin_cos (tree arglist, tree typ
   return NULL_TREE;
 }
 
+/* Fold function call to builtin cos, cosf, or cosl.  Return
+   NULL_TREE if no simplification can be made.  */
+static tree
+fold_builtin_sincos (tree arglist, tree fndecl)
+{
+  tree arg, arg1, arg2, sin_fn, cos_fn, sin_modify, cos_modify;
+  tree sin_fndecl, cos_fndecl;
+  enum machine_mode mode;
+  bool negate_sin;
+
+  if (!validate_arglist (arglist,
+			 REAL_TYPE, POINTER_TYPE, POINTER_TYPE, VOID_TYPE))
+    return NULL_TREE;
+
+  /* Check if sincos insn is available, otherwise fallback
+     to usual builtin.  */
+  arg = TREE_VALUE (arglist);
+  mode = TYPE_MODE (TREE_TYPE (arg));
+  if (sincos_optab->handlers[(int) mode].insn_code == CODE_FOR_nothing)
+    return NULL_TREE;
+
+  switch (DECL_FUNCTION_CODE (fndecl))
+    {
+    case BUILT_IN_SINCOS:
+      sin_fndecl = implicit_built_in_decls[BUILT_IN_SIN];
+      cos_fndecl = implicit_built_in_decls[BUILT_IN_COS];
+      break;
+
+    case BUILT_IN_SINCOSF:
+      sin_fndecl = implicit_built_in_decls[BUILT_IN_SINF];
+      cos_fndecl = implicit_built_in_decls[BUILT_IN_COSF];
+      break;
+
+    case BUILT_IN_SINCOSL:
+      sin_fndecl = implicit_built_in_decls[BUILT_IN_SINL];
+      cos_fndecl = implicit_built_in_decls[BUILT_IN_COSL];
+      break;
+
+    default:
+      gcc_unreachable ();
+    }
+
+  /* Avoid that cos(-x) is optimized into cos (x) and sincos_optab
+     cannot be used anymore.  */
+  if (TREE_CODE (arg) == NEGATE_EXPR)
+    {
+      arg = TREE_OPERAND (arg, 0);
+      negate_sin = true;
+    }
+  else
+    negate_sin = false;
+
+  arg1 = TREE_VALUE (TREE_CHAIN (arglist));
+  sin_fn = build_function_call_expr (sin_fndecl,
+				     build_tree_list (NULL_TREE, arg));
+  if (negate_sin)
+    sin_fn = build1 (NEGATE_EXPR, TREE_TYPE (sin_fn), sin_fn);
+
+  sin_modify =
+    build2 (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (arg1)),
+	    build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (arg1)), arg1),
+	    fold_convert (TREE_TYPE (TREE_TYPE (arg1)), sin_fn));
+
+  arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
+  cos_fn = build_function_call_expr (cos_fndecl,
+				     build_tree_list (NULL_TREE, arg));
+  cos_modify =
+    build2 (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (arg2)),
+	    build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (arg2)), arg2),
+	    fold_convert (TREE_TYPE (TREE_TYPE (arg2)), cos_fn));
+
+  return build1 (NOP_EXPR, void_type_node,
+		 build2 (COMPOUND_EXPR, TREE_TYPE (sin_modify),
+			 cos_modify, sin_modify));
+}
+
 /* Fold function call to builtin tan, tanf, or tanl.  Return
    NULL_TREE if no simplification can be made.  */
 static tree
@@ -8288,6 +8365,11 @@ fold_builtin_1 (tree exp, bool ignore)
     case BUILT_IN_COSL:
       return fold_builtin_cos (arglist, type, fndecl);
 
+    case BUILT_IN_SINCOS:
+    case BUILT_IN_SINCOSF:
+    case BUILT_IN_SINCOSL:
+      return fold_builtin_sincos (arglist, fndecl);
+
     case BUILT_IN_EXP:
     case BUILT_IN_EXPF:
     case BUILT_IN_EXPL:

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

* Re: Updating glibc mathinlines.h to reflect additional GCC builtins   ?
  2004-09-24 11:23   ` Paolo Bonzini
  2004-09-24 11:29     ` Paolo Bonzini
@ 2004-09-25 11:54     ` Giovanni Bajo
  2004-09-25 12:51       ` Paolo Bonzini
  1 sibling, 1 reply; 6+ messages in thread
From: Giovanni Bajo @ 2004-09-25 11:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Jakub Jelinek, gcc, libc-hacker

Paolo Bonzini wrote:

>> Just FYI (I don't think this is appropriate for stage3, and I haven't
>> bootstrapped/regtested it yet), here is a patch that does what I
>> suggested in the message Uros cited above.

>> 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
>>
>> * builtins.c (fold_builtin_sincos): New.
>> (fold_builtin): Call it.
>>
>> 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
>>
>> * gcc.dg/i386-387-9.c, gcc.dg/builtins-47.c: New testcases.

Please, file a new PR in Bugzilla, attacch this patch to it, and link it to
PR17652 (4.1 metabug), so that we don't lose this.

Thanks.
Giovanni Bajo


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

* Re: Updating glibc mathinlines.h to reflect additional GCC builtins ?
  2004-09-25 11:54     ` Giovanni Bajo
@ 2004-09-25 12:51       ` Paolo Bonzini
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2004-09-25 12:51 UTC (permalink / raw)
  To: Giovanni Bajo, gcc

> Please, file a new PR in Bugzilla, attacch this patch to it, and link it to
> PR17652 (4.1 metabug), so that we don't lose this.

I meant to do after bootstrapping/regtested.  BTW the patch surely needs 
to wrap the first argument with save_expr ().

Paolo

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

end of thread, other threads:[~2004-09-25 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24  6:38 Updating glibc mathinlines.h to reflect additional GCC builtins ? Kaveh R. Ghazi
2004-09-24  6:56 ` Uros Bizjak
2004-09-24 11:23   ` Paolo Bonzini
2004-09-24 11:29     ` Paolo Bonzini
2004-09-25 11:54     ` Giovanni Bajo
2004-09-25 12:51       ` Paolo Bonzini

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).