This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: SSE min/max take2 - documentation
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: SSE min/max take2 - documentation
- From: Geert Bosch <bosch at gnat dot com>
- Date: Tue, 27 Feb 2001 12:09:06 -0500 (EST)
- Cc: Fergus Henderson <fjh at cs dot mu dot oz dot au>, gcc-patches at gcc dot gnu dot org,patches at x86-64 dot org
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