Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-08-06 Thread Janne Blomqvist
On Wed, Jul 18, 2018 at 6:10 PM, Janne Blomqvist wrote: > On Wed, Jul 18, 2018 at 4:26 PM, Thomas König wrote: > >> Hi Kyrlll, >> >> > Am 18.07.2018 um 13:17 schrieb Kyrill Tkachov < >> kyrylo.tkac...@foss.arm.com>: >> > >> > Thomas, Janne, would this relaxation of NaN handling be acceptable >>

Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-07-26 Thread Joseph Myers
On Wed, 18 Jul 2018, Janne Blomqvist wrote: > minimumNumber(a, NaN) = minimumNumber(NaN, a) = a > > That is minimumNumber corresponds to minnum in IEEE 754-2008 and fmin* in No, it differs in the handling of signaling NaNs (with minimumNumber, if the NaN argument is signaling, it results in the

Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-07-18 Thread Kyrill Tkachov
Hi Richard, On 18/07/18 16:27, Richard Sandiford wrote: Thanks for doing this. Kyrill Tkachov writes: + calc = build_call_expr_internal_loc (input_location, ifn, type, + 2, mvar, convert (type, val)); (indentation looks off) diff --git a/gcc/tes

Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-07-18 Thread Richard Sandiford
Thanks for doing this. Kyrill Tkachov writes: > + calc = build_call_expr_internal_loc (input_location, ifn, type, > + 2, mvar, convert (type, val)); (indentation looks off) > diff --git a/gcc/testsuite/gfortran.dg/max_fmaxl_aarch64.f90 > b/gcc/testsuite

Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-07-18 Thread Janne Blomqvist
On Wed, Jul 18, 2018 at 4:26 PM, Thomas König wrote: > Hi Kyrlll, > > > Am 18.07.2018 um 13:17 schrieb Kyrill Tkachov < > kyrylo.tkac...@foss.arm.com>: > > > > Thomas, Janne, would this relaxation of NaN handling be acceptable given > the benefits > > mentioned above? If so, what would be the rec

Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-07-18 Thread Janne Blomqvist
On Wed, Jul 18, 2018 at 5:03 PM, Kyrill Tkachov wrote: > > On 18/07/18 14:26, Thomas König wrote: > >> Hi Kyrlll, >> >> Am 18.07.2018 um 13:17 schrieb Kyrill Tkachov < >>> kyrylo.tkac...@foss.arm.com>: >>> >>> Thomas, Janne, would this relaxation of NaN handling be acceptable given >>> the benefi

Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-07-18 Thread Kyrill Tkachov
On 18/07/18 14:26, Thomas König wrote: Hi Kyrlll, Am 18.07.2018 um 13:17 schrieb Kyrill Tkachov : Thomas, Janne, would this relaxation of NaN handling be acceptable given the benefits mentioned above? If so, what would be the recommended adjustment to the nan_1.f90 test? I would be a bit c

Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-07-18 Thread Thomas König
Hi Kyrlll, > Am 18.07.2018 um 13:17 schrieb Kyrill Tkachov : > > Thomas, Janne, would this relaxation of NaN handling be acceptable given the > benefits > mentioned above? If so, what would be the recommended adjustment to the > nan_1.f90 test? I would be a bit careful about changing behavior

[PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics

2018-07-18 Thread Kyrill Tkachov
Hi all, Thank you for the feedback so far. This version of the patch doesn't try to emit fmin/fmax function calls but instead emits MIN/MAX_EXPR sequences unconditionally. I think a source of confusion in the original proposal (for me at least) was that on aarch64 (that I primarily work on) we i