This is the mail archive of the gcc-bugs@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]

[Bug middle-end/29335] transcendental functions with constant arguments should be resolved at compile-time



------- Comment #23 from ghazi at gcc dot gnu dot org  2006-10-29 02:02 -------
Subject: Bug 29335

Author: ghazi
Date: Sun Oct 29 02:02:10 2006
New Revision: 118129

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118129
Log:
        PR middle-end/29335
        * builtins.c (do_mpfr_arg2, fold_builtin_hypot): New.
        (fold_builtin_pow): Evaluate constant arguments at compile-time
        using MPFR.
        (fold_builtin_1): Handle BUILT_IN_ATAN2 and BUILT_IN_HYPOT.
        (do_mpfr_ckconv): New helper function.
        (do_mpfr_arg1): Use do_mpfr_ckconv.
        (do_mpfr_arg2): New.

testsuite:
        * gcc.dg/builtins-20.c: Add tests for hypot.
        * gcc.dg/torture/builtin-math-2.c (TESTIT2): New.  Add tests for
        two-argument builtins.
        * gcc.dg/torture/builtin-math-3.c (TESTIT_R): Renamed from
        TESTIT2.  Update all callers.
        (TESTIT2, TESTIT2_R): New helper macros.
        Add testcases for pow, hypot and atan2.


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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29335


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