Re: patch to bug #86829

2018-10-03 Thread Jeff Law
On 8/22/18 6:02 AM, Richard Biener wrote: > On Tue, Aug 21, 2018 at 11:27 PM Jeff Law wrote: >> >> On 08/21/2018 02:08 PM, Giuliano Augusto Faulin Belinassi wrote: Just as an example, compare the results for x = 0x1.fp1023 >>> >>> Thank you for your answer and the counterexam

Re: patch to bug #86829

2018-08-23 Thread Giuliano Augusto Faulin Belinassi
> > Ah, a runtime test. That'd be sufficient. The cost when we can't do > the transformation is relatively small, but the gains when we can are huge. Thank you. I will update the patch and send it again :-) On Wed, Aug 22, 2018 at 7:05 PM, Jeff Law wrote: > On 08/22/2018 06:02 AM, Richard Bien

Re: patch to bug #86829

2018-08-22 Thread Jeff Law
On 08/22/2018 06:02 AM, Richard Biener wrote: > On Tue, Aug 21, 2018 at 11:27 PM Jeff Law wrote: >> >> On 08/21/2018 02:08 PM, Giuliano Augusto Faulin Belinassi wrote: Just as an example, compare the results for x = 0x1.fp1023 >>> >>> Thank you for your answer and the counter

Re: patch to bug #86829

2018-08-22 Thread Richard Biener
On Tue, Aug 21, 2018 at 11:27 PM Jeff Law wrote: > > On 08/21/2018 02:08 PM, Giuliano Augusto Faulin Belinassi wrote: > >> Just as an example, compare the results for > >> x = 0x1.fp1023 > > > > Thank you for your answer and the counterexample. :-) > > > >> If we had useful range info

Re: patch to bug #86829

2018-08-21 Thread Joseph Myers
On Tue, 21 Aug 2018, Jeff Law wrote: > The problem is our VRP implementation doesn't handle any floating point > types at this time. If we had range information for FP types, then > this kind of analysis is precisely what we'd need to do the > transformation regardless of -ffast-math. I don't t

Re: patch to bug #86829

2018-08-21 Thread Jeff Law
On 08/21/2018 02:08 PM, Giuliano Augusto Faulin Belinassi wrote: >> Just as an example, compare the results for >> x = 0x1.fp1023 > > Thank you for your answer and the counterexample. :-) > >> If we had useful range info on floats we might conditionalize such >> transforms appropriate

Re: patch to bug #86829

2018-08-21 Thread Giuliano Augusto Faulin Belinassi
> Just as an example, compare the results for > x = 0x1.fp1023 Thank you for your answer and the counterexample. :-) > If we had useful range info on floats we might conditionalize such > transforms appropriately. Or we can enable it on floats and do > the sqrt (x*x + 1) in double.

Re: patch to bug #86829

2018-08-21 Thread Jeff Law
On 08/21/2018 02:02 AM, Richard Biener wrote: > On Mon, Aug 20, 2018 at 9:40 PM Jeff Law wrote: >> >> On 08/04/2018 07:22 AM, Giuliano Augusto Faulin Belinassi wrote: >>> Closes bug #86829 >>> >>> Description: Adds substitution rules for both sin(atan(x)) and >>> cos(atan(x)). These formulas are r

Re: patch to bug #86829

2018-08-21 Thread Richard Biener
On Mon, Aug 20, 2018 at 9:40 PM Jeff Law wrote: > > On 08/04/2018 07:22 AM, Giuliano Augusto Faulin Belinassi wrote: > > Closes bug #86829 > > > > Description: Adds substitution rules for both sin(atan(x)) and > > cos(atan(x)). These formulas are replaced by x / sqrt(x*x + 1) and 1 / > > sqrt(x*x

Re: patch to bug #86829

2018-08-20 Thread Jeff Law
On 08/04/2018 07:22 AM, Giuliano Augusto Faulin Belinassi wrote: > Closes bug #86829 > > Description: Adds substitution rules for both sin(atan(x)) and > cos(atan(x)). These formulas are replaced by x / sqrt(x*x + 1) and 1 / > sqrt(x*x + 1) respectively, providing up to 10x speedup. This identity

Re: patch to bug #86829

2018-08-18 Thread Giuliano Augusto Faulin Belinassi
ping On Sat, Aug 4, 2018 at 10:22 AM, Giuliano Augusto Faulin Belinassi wrote: > Closes bug #86829 > > Description: Adds substitution rules for both sin(atan(x)) and > cos(atan(x)). These formulas are replaced by x / sqrt(x*x + 1) and 1 / > sqrt(x*x + 1) respectively, providing up to 10x speedup.