Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-21 Thread Richard Biener
On Thu, Aug 20, 2015 at 12:58 PM, Richard Biener wrote: > On Thu, Aug 20, 2015 at 11:18 AM, Hurugalawadi, Naveen > wrote: >> Hi, >> Works for me if you specify -fno-math-errno. I think that's a "regression" we can accept. >> >> Modified the pattern with "fno-math-errno" as a condition.

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-20 Thread Richard Biener
On Thu, Aug 20, 2015 at 11:18 AM, Hurugalawadi, Naveen wrote: > Hi, > >>> Works for me if you specify -fno-math-errno. I think that's a >>> "regression" we can accept. > > Modified the pattern with "fno-math-errno" as a condition. > >>> Can you re-post with the typo fix and the missing :s? > > Pl

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-20 Thread Hurugalawadi, Naveen
Hi, >> Works for me if you specify -fno-math-errno. I think that's a >> "regression" we can accept. Modified the pattern with "fno-math-errno" as a condition. >> Can you re-post with the typo fix and the missing :s? Please find attached the modified patch as per the review comments. Please sug

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-20 Thread Marc Glisse
On Thu, 20 Aug 2015, Richard Biener wrote: On Thu, Aug 20, 2015 at 7:38 AM, Marc Glisse wrote: On Thu, 20 Aug 2015, Hurugalawadi, Naveen wrote: The following testcase does not generate "x" as needed. double t (double x) { x = sqrt (x) * sqrt (x); return x; }

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-20 Thread Richard Biener
On Thu, Aug 20, 2015 at 7:38 AM, Marc Glisse wrote: > On Thu, 20 Aug 2015, Hurugalawadi, Naveen wrote: > >> The following testcase does not generate "x" as needed. >> >> double t (double x) >> { >> x = sqrt (x) * sqrt (x); >> return x; >> } >> > > > With -

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-20 Thread Richard Biener
On Thu, Aug 20, 2015 at 6:48 AM, Hurugalawadi, Naveen wrote: > Hi, > > Thanks again for your review and useful comments. > >>> I see. But I can't really help without a testcase that I can use to have a >>> look >>> (same for the above issue with the segfaults). > > The following testcase does no

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-19 Thread Marc Glisse
On Thu, 20 Aug 2015, Hurugalawadi, Naveen wrote: The following testcase does not generate "x" as needed. double t (double x) { x = sqrt (x) * sqrt (x); return x; } With -fno-math-errno, we CSE the calls to sqrt, so I would expect this to match: (m

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-19 Thread Hurugalawadi, Naveen
Hi, Thanks again for your review and useful comments. >> I see. But I can't really help without a testcase that I can use to have a >> look >> (same for the above issue with the segfaults). The following testcase does not generate "x" as needed. double t (double x) { x =

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-19 Thread Richard Biener
On Wed, Aug 19, 2015 at 6:53 AM, Hurugalawadi, Naveen wrote: > Hi Richard, > > Thanks very much for your review and comments. > >>> Can you point me to which patterns exhibit this behavior? > > root(x)*root(y) as root(x*y) > expN(x)*expN(y) as expN(x+y) > pow(x,y)*pow(x,z) as pow(x,y+z) > x/expN(y

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-18 Thread Hurugalawadi, Naveen
Hi Richard, Thanks very much for your review and comments. >> Can you point me to which patterns exhibit this behavior? root(x)*root(y) as root(x*y) expN(x)*expN(y) as expN(x+y) pow(x,y)*pow(x,z) as pow(x,y+z) x/expN(y) into x*expN(-y) Long Double and Float variants FAIL with segmentation fau

Re: Move some flag_unsafe_math_optimizations using simplify and match

2015-08-18 Thread Richard Biener
On Mon, Aug 17, 2015 at 7:24 AM, Hurugalawadi, Naveen wrote: > Hi, > > Please find attached the modified patch as per the comments. > > Tested the patch on AArch64 and X86 without any regressions. > > The other hunks of the earlier patch have been removed as per the earlier > comments due to failu