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: SSE min/max take2 - documentation




On Tue, 27 Feb 2001, Jan Hubicka wrote:
|> I'd say that the tree construct for 'max' should have exactly the same 
|> semantics as the (x > y ? x : y) construct in C. On IEEE compliant machines,
|> this means we have all the proper behaviour regarding signed zeroes and
|> NaN's. On other machines, or on -ffast-math compilations, we have additional
|> freedom.
|PowerPC is having min/max pattern using >= and <= comparators, unfortunately.

We can use the identity (x > y ? x : y) == (-y <= -x ? y : x) 
to uniformly handle all cases on all platforms. This identity
holds in presence of signed zeroes, infinities and NaN's.

  -Geert


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