[lno] [RFC] if-conversion and auto vectorizer

Richard Henderson rth@redhat.com
Mon Mar 15 22:38:00 GMT 2004


On Sun, Mar 14, 2004 at 06:28:51PM -0800, Alex Rosenberg wrote:
> Maybe I keep stating the obvious, but it seems to me that it would be 
> better to remove the MIN/MAX nodes, in favor of the SELECT node that 
> Dorit has suggested since MIN/MAX are just specific CMPs mated with a 
> SELECT.

No.

(1) MIN/MAX have better floating-point properties than conditional move.
    Consider 

	a = 0; b = NaN;

	c = a < b ? b : a;		// 0
    vs
	c = a > b ? a : b;		// NaN
    vs
	c = max(a, b);			// Undefined

    Undefined is good because then the target md pattern doesn't have to
    be careful to preserve one or the other of the values in the face of
    unordered comparisons.

(2) I reiterate that we will NOT be adding a new SELECT node.
    The sooner Dorit changes to use COND_EXPR as I asked, the better.


r~



More information about the Gcc mailing list