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 tree-optimization/20219] Missed optimisation sin / tan --> cos



------- Comment #4 from uros at gcc dot gnu dot org  2005-11-28 07:29 -------
Subject: Bug 20219

Author: uros
Date: Mon Nov 28 07:29:43 2005
New Revision: 107597

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107597
Log:
        PR middle-end/20219
        * fold-const.c (fold binary) <RDIV_EXPR>: Optimize 
        sin(x)/tan(x) as cos(x) and tan(x)/sin(x) as 1.0/cos(x)
        when flag_unsafe_math_optimizations is set and
        we don't care about NaNs or Infinities.

        Move x/expN(y) and x/pow(y,z) transformation into common
        flag_unsafe_math_optimizations section.

testsuite/

        * gcc.dg/builtins-20.c: Add checks for sin(x)/tan(x) and
        tan(x)/sin(x) transformations.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/builtins-20.c


-- 


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


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