User account creation filtered due to spam.

Bug 30251

Summary: Evaluate bessel functions at compile-time
Product: gcc Reporter: Kaveh Ghazi <ghazi>
Component: middle-endAssignee: Kaveh Ghazi <ghazi>
Status: RESOLVED FIXED    
Severity: enhancement CC: gcc-bugs, vincent-gcc
Priority: P3 Keywords: missed-optimization
Version: 4.3.0   
Target Milestone: 4.3.0   
URL: http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01663.html
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2006-12-24 03:34:02
Bug Depends on: 29335    
Bug Blocks:    

Description Kaveh Ghazi 2006-12-18 15:02:18 UTC
We should use MPFR to evaluate the c99 bessel functions.  However we have to wait until MPFR implements a suitable interface as described here:

http://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/TODO?root=mpfr&rev=3448&r1=3446&r2=3448
Comment 1 Andrew Pinski 2006-12-24 03:34:02 UTC
Confirmed.
Comment 2 Kaveh Ghazi 2007-05-03 03:43:49 UTC
Bessel patches posted here:
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01624.html
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01663.html

Awaiting review.
Comment 3 Kaveh Ghazi 2007-05-18 02:04:36 UTC
Subject: Bug 30251

Author: ghazi
Date: Fri May 18 01:04:12 2007
New Revision: 124818

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124818
Log:
	PR middle-end/30251
	* builtins.c (do_mpfr_bessel_n): New.
	(fold_builtin_1): Handle BUILT_IN_J0 and BUILT_IN_J1.
	(fold_builtin_2): Handle BUILT_IN_JN.

testsuite:
	* gcc.dg/torture/builtin-math-4.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/torture/builtin-math-4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 Kaveh Ghazi 2007-05-18 02:15:53 UTC
Subject: Bug 30251

Author: ghazi
Date: Fri May 18 01:15:28 2007
New Revision: 124819

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124819
Log:
	PR middle-end/30251
	* builtins.c (fold_builtin_1): Handle y0, y1.
	(fold_builtin_2): Handle yn.

testsuite:
	* gcc.dg/torture/builtin-math-2.c: Test y0, y1, yn.
	* gcc.dg/torture/builtin-math-4.c: Likewise.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/torture/builtin-math-2.c
    trunk/gcc/testsuite/gcc.dg/torture/builtin-math-4.c

Comment 5 Kaveh Ghazi 2007-05-19 05:12:51 UTC
Functionality installed on trunk.