------- Comment #12 from uros at kss-loka dot si 2006-03-29 14:08 ------- (In reply to comment #11) > it looks like 4.1.1 and 4.2.0 still produce unoptimal code.
> test: pushl %ebp > movl %esp, %ebp > fldl 8(%ebp) > fldz > fcomip %st(1), %st > jae .L2 > popl %ebp > fcos > ret > > .L2: popl %ebp > fsin > ret No, this code is optimal. Please compare the code above to the code in description, where fcos is calculated even if x <= 0.0 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15187