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 target/17390] missing floating point compare optimization


------- Additional Comments From uros at kss-loka dot si  2004-09-10 08:39 -------
Some comments here:

http://gcc.gnu.org/ml/gcc/2004-09/msg00413.html
http://gcc.gnu.org/ml/gcc/2004-09/msg00514.html

For TARGET_CMOVE, resulting code is totally different:

test:
        fldz
        fldl    4(%esp)
        fcomip  %st(1), %st
        je      .L11
        fstp    %st(0)
        flds    .LC1
        fld1
        fcmovbe %st(1), %st
        fstp    %st(1)
.L11:
        ret

It looks that the problem is because  ix86_split_fp_branch() from *fp_jcc_?
patterns is called after "reload_completed". However, the comment on top says:

;; Define combination compare-and-branch fp compare instructions to use
;; during early optimization.  Splitting the operation apart early makes
;; for bad code when we want to reverse the operation.

It is not clear to me, what is meant by "reverse the operation"...

-- 


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


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