Re: PR83750: CSE erf/erfc pair

2018-11-09 Thread Richard Biener
On Fri, Nov 9, 2018 at 8:11 AM Prathamesh Kulkarni wrote: > > On Tue, 6 Nov 2018 at 16:04, Richard Biener > wrote: > > > > On Mon, Nov 5, 2018 at 3:11 PM Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 5 Nov 2018 at 18:14, Richard Biener > > > wrote: > > > > > > > > On Mon, Nov 5, 2018 at

Re: PR83750: CSE erf/erfc pair

2018-11-08 Thread Prathamesh Kulkarni
On Tue, 6 Nov 2018 at 16:04, Richard Biener wrote: > > On Mon, Nov 5, 2018 at 3:11 PM Prathamesh Kulkarni > wrote: > > > > On Mon, 5 Nov 2018 at 18:14, Richard Biener > > wrote: > > > > > > On Mon, Nov 5, 2018 at 1:11 PM Prathamesh Kulkarni > > > wrote: > > > > > > > > On Mon, 5 Nov 2018 at 15

Re: PR83750: CSE erf/erfc pair

2018-11-06 Thread Richard Biener
On Mon, Nov 5, 2018 at 3:11 PM Prathamesh Kulkarni wrote: > > On Mon, 5 Nov 2018 at 18:14, Richard Biener > wrote: > > > > On Mon, Nov 5, 2018 at 1:11 PM Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 5 Nov 2018 at 15:10, Richard Biener > > > wrote: > > > > > > > > On Fri, Nov 2, 2018 at

Re: PR83750: CSE erf/erfc pair

2018-11-05 Thread Paul Koning
> On Nov 5, 2018, at 1:48 PM, Michael Matz wrote: > > Hi, > > On Mon, 5 Nov 2018, Jeff Law wrote: > Don't we have a flag specific to honoring nans? Would that be better to use than flag_unsafe_math_optimizations? As Uli mentioned, there's >>> >>> That's only relevant for

Re: PR83750: CSE erf/erfc pair

2018-11-05 Thread Michael Matz
Hi, On Mon, 5 Nov 2018, Jeff Law wrote: > >> Don't we have a flag specific to honoring nans? Would that be better > >> to use than flag_unsafe_math_optimizations? As Uli mentioned, > >> there's > > > > That's only relevant for the comparison optimization, of course. > > > > Converting erfc

Re: PR83750: CSE erf/erfc pair

2018-11-05 Thread Jeff Law
On 11/5/18 11:27 AM, Joseph Myers wrote: > On Sun, 4 Nov 2018, Jeff Law wrote: > >> Don't we have a flag specific to honoring nans? Would that be better to >> use than flag_unsafe_math_optimizations? As Uli mentioned, there's > > That's only relevant for the comparison optimization, of course.

Re: PR83750: CSE erf/erfc pair

2018-11-05 Thread Joseph Myers
On Sun, 4 Nov 2018, Jeff Law wrote: > Don't we have a flag specific to honoring nans? Would that be better to > use than flag_unsafe_math_optimizations? As Uli mentioned, there's That's only relevant for the comparison optimization, of course. Converting erfc to 1-erf is dubious, since the who

Re: PR83750: CSE erf/erfc pair

2018-11-05 Thread Prathamesh Kulkarni
On Mon, 5 Nov 2018 at 18:14, Richard Biener wrote: > > On Mon, Nov 5, 2018 at 1:11 PM Prathamesh Kulkarni > wrote: > > > > On Mon, 5 Nov 2018 at 15:10, Richard Biener > > wrote: > > > > > > On Fri, Nov 2, 2018 at 10:37 AM Prathamesh Kulkarni > > > wrote: > > > > > > > > Hi, > > > > This patch

Re: PR83750: CSE erf/erfc pair

2018-11-05 Thread Richard Biener
On Mon, Nov 5, 2018 at 1:11 PM Prathamesh Kulkarni wrote: > > On Mon, 5 Nov 2018 at 15:10, Richard Biener > wrote: > > > > On Fri, Nov 2, 2018 at 10:37 AM Prathamesh Kulkarni > > wrote: > > > > > > Hi, > > > This patch adds two transforms to match.pd to CSE erf/erfc pair. > > > erfc(x) is canon

Re: PR83750: CSE erf/erfc pair

2018-11-05 Thread Prathamesh Kulkarni
On Mon, 5 Nov 2018 at 15:10, Richard Biener wrote: > > On Fri, Nov 2, 2018 at 10:37 AM Prathamesh Kulkarni > wrote: > > > > Hi, > > This patch adds two transforms to match.pd to CSE erf/erfc pair. > > erfc(x) is canonicalized to 1 - erf(x) and is then reversed to 1 - > > erf(x) when canonicalizat

Re: PR83750: CSE erf/erfc pair

2018-11-05 Thread Richard Biener
On Fri, Nov 2, 2018 at 10:37 AM Prathamesh Kulkarni wrote: > > Hi, > This patch adds two transforms to match.pd to CSE erf/erfc pair. > erfc(x) is canonicalized to 1 - erf(x) and is then reversed to 1 - > erf(x) when canonicalization is disabled and result of erf(x) has > single use within 1 - erf

Re: PR83750: CSE erf/erfc pair

2018-11-04 Thread Jeff Law
On 11/2/18 3:36 AM, Prathamesh Kulkarni wrote: > Hi, > This patch adds two transforms to match.pd to CSE erf/erfc pair. > erfc(x) is canonicalized to 1 - erf(x) and is then reversed to 1 - > erf(x) when canonicalization is disabled and result of erf(x) has > single use within 1 - erf(x). > > The p

Re: PR83750: CSE erf/erfc pair

2018-11-02 Thread Ulrich Drepper
On Fri, Nov 2, 2018 at 10:36 AM Prathamesh Kulkarni wrote: > So, the patch adds another transform erf(x) > 1 -> 0 > which resolves the regression. Why don't you match for any constant with absolute value >= 1.0 instead of just 1.0?