[PATCH] D11262: [SDAG] Add new ISD nodes: ISD::FMINNAN and ISD::FMAXNAN

Hal Finkel hfinkel at anl.gov
Sun Jul 26 07:35:52 PDT 2015


----- Original Message -----
> From: "James Molloy" <james at jamesmolloy.co.uk>
> To: reviews+D11262+public+3656ac992c768be4 at reviews.llvm.org, "james molloy" <james.molloy at arm.com>, "ahmed bougacha"
> <ahmed.bougacha at gmail.com>, "Matthew Arsenault" <Matthew.Arsenault at amd.com>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Sunday, July 26, 2015 9:09:32 AM
> Subject: Re: [PATCH] D11262: [SDAG] Add new ISD nodes: ISD::FMINNAN and	ISD::FMAXNAN
> 
> 
> 
> Hi Hal,
> 
> 
> Sure! This is strongly linked to my ValueTracking change.
> ValueTracking will be able to identify floating point mins and
> maxes, but as you know only a subset of those map to
> fminnum/fmaxnum. ARM at least has separate instructions for the
> different NaN behavior, so the intention of these patches is to
> provide SDAG support for them, and to use them most efficiently
> (there are currently three separate bits of code in the ARM/AArch64
> backends to match these...).
> 
> 
> Specifically, if matchSelectPattern() returns a SPF_FMINNUM or
> SPF_FMAXNUM, then:
> * SPNB_RETURNS_OTHER maps to ISD::FMINNUM/FMAXNUM which in ARM's case
> is matched to "fminnm"/"fmaxnm".
> * SPNB_RETURNS_NAN maps to ISD::FMINNAN/FMAXNAN which in ARM's case
> is matched to "fmin"/"fmax".
> * SPNB_RETURNS_ANY maps to either FMINNUM or FMINNAN depending on
> target availability. In -ffast-math mode, all queries return this.
> 
> 
> This should allow us to take advantage of target instructions as much
> as possible, even in non-fast-math mode.

Okay, that makes sense.

 -Hal

> 
> 
> Cheers,
> 
> 
> James
> 
> 
> On Sun, 26 Jul 2015 at 01:11 hfinkel at anl.gov < hfinkel at anl.gov >
> wrote:
> 
> 
> hfinkel added a subscriber: hfinkel.
> hfinkel added a comment.
> 
> Can you please describe the SDAG changes you have in mind; is there
> some common sequence of nodes involving fminnum/fmaxnum that you
> expect to turn into these nodes?
> 
> 
> Repository:
> rL LLVM
> 
> http://reviews.llvm.org/D11262
> 
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list