This is the mail archive of the
mailing list for the GCC project.
Re: [patches] Re: SSE min/max instruction support
> On Sat, Feb 24, 2001 at 11:40:44PM +0100, Jan Hubicka wrote:
> > Note that the definition if min/max for floats is pretty touchy.
> > SSE defines that for two zeros, always second zero is returned
> > and for unordered too, so it corresponds to the <
> > other may define <= equivalent or some other changes.
> Investigating, it seems that we only ever create smin/smax
> for floats if fast_math.
Thats my impression too. They can come only from fold_const and it has
the generation blocked by IEEE_FP.
The definition in expr.c seems to be consistent with what i386 does.
If there is no min?? pattern, we just work around by jumping using LT/GT
Whats also about explicitly documenting the i386 behaviour for smin/smax
FP, so we can use them in IEEE compilation?
> > Perhaps keeping if_then_else is better way and update the
> > ia64/rs6000 respectivly.
> I guess that is probably best.
I am not having any chance to test ia64/rs6000, but I guess this is
trivial change enought to test.
> I think you do want to go ahead and have the "minsf3" etc expanders
> though, so that the middle-end can go ahead and create the patterns
> directly when it needs to.
OK, would be my patch ok with patterns renamed to minsf3/maxsf3?
> It would also be good to teach ifcvt how to use the min/max
> expanders. A couple of targets have special code sequences
> or explicit min/max insns.
See my next followup.