Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-11-25 Thread Richard Biener
On Mon, Nov 23, 2015 at 10:21 AM, David Sherwood wrote: > Hi, > > This is part 1 of a reworked version of a patch I originally submitted in > August, rebased after Richard Sandiford's recent work on the internal > functions. This first patch adds the internal function

RE: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-11-23 Thread David Sherwood
Hi, This is part 1 of a reworked version of a patch I originally submitted in August, rebased after Richard Sandiford's recent work on the internal functions. This first patch adds the internal function definitions and optabs that provide support for IEEE fmax()/fmin() functions. Later patches

RE: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-09-14 Thread David Sherwood
Hi All, For what it's worth I have uploaded a new patch that changes the name from STRICT_FMIN/MAX to just FMIN/FMAX, although I realise that this discussion has not yet been resolved. I have also added scheduling attributes to the aarch64 instructions. Regards, David Sherwood. ChangeLog:

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-09-14 Thread Richard Biener
To make progess here I think adding new optabs is fine. So can you split out that part and implement builtin expanders for fmin/max instead? Btw, FMIN/MAX_EXPR are not commutative AFAIK because of behavior for fmax (-NaN, NaN) vs. fmax (NaN, -NaN)? Richard. On Mon, Sep 14, 2015 at 12:36 PM,

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-09-14 Thread Joseph Myers
On Mon, 14 Sep 2015, Richard Biener wrote: > To make progess here I think adding new optabs is fine. So can you > split out that part and implement builtin expanders > for fmin/max instead? > > Btw, FMIN/MAX_EXPR are not commutative AFAIK because of behavior for > fmax (-NaN, NaN) > vs. fmax

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Sandiford
Richard Biener richard.guent...@gmail.com writes: On Wed, Aug 19, 2015 at 11:54 AM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Tue, Aug 18, 2015 at 4:15 PM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Biener
On Wed, Aug 19, 2015 at 3:06 PM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: As an additional point for many math functions we have to support errno which means, like, BUILT_IN_SQRT can be rewritten to SQRT_EXPR only if -fno-math-errno

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Sandiford
Richard Biener richard.guent...@gmail.com writes: As an additional point for many math functions we have to support errno which means, like, BUILT_IN_SQRT can be rewritten to SQRT_EXPR only if -fno-math-errno is in effect. But then code has to handle both variants for things like constant

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Biener
On Wed, Aug 19, 2015 at 2:11 PM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Wed, Aug 19, 2015 at 11:54 AM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Tue, Aug 18, 2015 at

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Biener
On August 19, 2015 5:05:01 PM GMT+02:00, Michael Matz m...@suse.de wrote: Hi, On Wed, 19 Aug 2015, Richard Biener wrote: I think tree_code is 64bits now. Huh? No; it's 16 bit since 8 bit run out. Err, that's what I was trying to say... 16bits, obviously. BTW, in addition to errno math there

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Joseph Myers
On Wed, 19 Aug 2015, Richard Biener wrote: As an additional point for many math functions we have to support errno which means, like, BUILT_IN_SQRT can be rewritten to SQRT_EXPR only if -fno-math-errno is in effect. But then code has to handle I'd say that for functions like that (which can

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Michael Matz
Hi, On Wed, 19 Aug 2015, Richard Biener wrote: I think tree_code is 64bits now. Huh? No; it's 16 bit since 8 bit run out. Ciao, Michael.

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Sandiford
Richard Biener richard.guent...@gmail.com writes: BTW, in addition to errno math there is rounding math where we rely on virtual operands to not mess with ordering. But you know what I'm going to say to that. Rounding affects arithmetic just as much as things like pow(). (And also doesn't

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Biener
On Wed, Aug 19, 2015 at 11:54 AM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Tue, Aug 18, 2015 at 4:15 PM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Tue, Aug 18, 2015 at

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Biener
On Tue, Aug 18, 2015 at 4:15 PM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Tue, Aug 18, 2015 at 1:07 PM, David Sherwood david.sherw...@arm.com wrote: On Mon, Aug 17, 2015 at 11:29 AM, David Sherwood david.sherw...@arm.com wrote:

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-19 Thread Richard Sandiford
Richard Biener richard.guent...@gmail.com writes: On Tue, Aug 18, 2015 at 4:15 PM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Tue, Aug 18, 2015 at 1:07 PM, David Sherwood david.sherw...@arm.com wrote: On Mon, Aug 17, 2015 at 11:29

RE: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-18 Thread David Sherwood
On Mon, Aug 17, 2015 at 11:29 AM, David Sherwood david.sherw...@arm.com wrote: Hi Richard, Thanks for the reply. I'd chosen to add new expressions as this seemed more consistent with the existing MAX_EXPR and MIN_EXPR tree codes. In addition it would seem to provide more

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-18 Thread Richard Biener
On Tue, Aug 18, 2015 at 1:07 PM, David Sherwood david.sherw...@arm.com wrote: On Mon, Aug 17, 2015 at 11:29 AM, David Sherwood david.sherw...@arm.com wrote: Hi Richard, Thanks for the reply. I'd chosen to add new expressions as this seemed more consistent with the existing MAX_EXPR and

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-18 Thread Richard Sandiford
Richard Biener richard.guent...@gmail.com writes: On Tue, Aug 18, 2015 at 1:07 PM, David Sherwood david.sherw...@arm.com wrote: On Mon, Aug 17, 2015 at 11:29 AM, David Sherwood david.sherw...@arm.com wrote: Hi Richard, Thanks for the reply. I'd chosen to add new expressions as this

RE: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-17 Thread David Sherwood
Hi Richard, Thanks for the reply. I'd chosen to add new expressions as this seemed more consistent with the existing MAX_EXPR and MIN_EXPR tree codes. In addition it would seem to provide more opportunities for optimisation than a target-specific builtin implementation would. I accept that

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-17 Thread Richard Biener
On Mon, Aug 17, 2015 at 11:29 AM, David Sherwood david.sherw...@arm.com wrote: Hi Richard, Thanks for the reply. I'd chosen to add new expressions as this seemed more consistent with the existing MAX_EXPR and MIN_EXPR tree codes. In addition it would seem to provide more opportunities for

Re: [PING][Patch] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-08-13 Thread Richard Biener
On Thu, Aug 13, 2015 at 12:11 PM, David Sherwood david.sherw...@arm.com wrote: Hi, Sorry to bother people again. Is this OK to go now? Hmm, why don't you go the vectorized function call path for this, implementing the builtin_vectorized_function target hook? Richard. Thanks! David.