This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/17390] missing floating point compare optimization
- From: "uros at kss-loka dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2004 08:39:25 -0000
- Subject: [Bug target/17390] missing floating point compare optimization
- References: <20040910082759.17390.uros@kss-loka.si>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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