This is the mail archive of the gcc-patches@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]

Re: A new patch for floating point conditional mov on PPo


> notice_update_cc assumes conditional move clobber cc0. Yes, we may be
> able to optimize it for some/all int conditional moves. But we can
> always let notice_update_cc know fp conditional moves clobber cc0.

notice_update_cc may assume that conditional moves clobber cc0, however
it doesn't assume that a integer comparison clobbers cc0.  When you
emit the integer comparison you look ahead to see if a floating point
conditional move is being performed in which case you setup cc0
so that it reflects if the move should be performed or not.  Notice
that at this point cc0 doesn't reflect the integer comparison mentioned
in the RTL ... it instead merely reflects if the conditional move should
be performed.

It may be cleaner to implement this along the lines of ffssi2, or by
keeping the comparison as part of the conditional move instruction.

> notice_update_cc assumes conditional move clobber cc0. Yes, we may be
> able to optimize it for some/all int conditional moves. But we can
> always let notice_update_cc know fp conditional moves clobber cc0.

I would imagine that it's desirable to make notice_update_cc smarter
about integer conditional moves.  I don't belive that cc0 has to be
clobbered even in the case of floating point conditional moves based
on unsigned integer comparisons or signed EQ / NE comparions.

> That is exactly what notice_update_cc () does now. So my patch
> is safe with the current notice_update_cc ().

Maybe ... I just tend to be a little paranoid at times figuring that
the compiler is out to get me. :-) :-)

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------



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