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 rtl-optimization/15187] Inefficient if optimization with -O2 -ffast-math



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


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