Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-20 Thread Kyrill Tkachov
On 18/05/15 11:32, Richard Biener wrote: On Wed, May 13, 2015 at 5:33 PM, Kyrill Tkachov kyrylo.tkac...@foss.arm.com wrote: Hi Richard, On 13/05/15 12:27, Richard Biener wrote: I notice that we don't have a testuite check that the target has a hw sqrt instructions. Would you like me to add

Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-18 Thread Richard Biener
On Wed, May 13, 2015 at 5:33 PM, Kyrill Tkachov kyrylo.tkac...@foss.arm.com wrote: Hi Richard, On 13/05/15 12:27, Richard Biener wrote: I notice that we don't have a testuite check that the target has a hw sqrt instructions. Would you like me to add one? Or can I make the testcase

Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-13 Thread Richard Biener
On Fri, May 8, 2015 at 5:09 PM, Kyrill Tkachov kyrylo.tkac...@foss.arm.com wrote: On 08/05/15 14:56, Kyrill Tkachov wrote: On 08/05/15 11:18, Richard Biener wrote: On Fri, May 1, 2015 at 6:02 PM, Kyrill Tkachov kyrylo.tkac...@foss.arm.com wrote: Hi all, GCC has some logic to expand

Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-13 Thread Kyrill Tkachov
Hi Richard, On 13/05/15 12:27, Richard Biener wrote: I notice that we don't have a testuite check that the target has a hw sqrt instructions. Would you like me to add one? Or can I make the testcase aarch64-specific? Would be great to have a testsuite check for this. I've committed the

Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-08 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00071.html Thanks, Kyrill On 01/05/15 17:02, Kyrill Tkachov wrote: Hi all, GCC has some logic to expand calls to pow (x, 0.75), pow (0.25) and pow (x, (int)k + 0.5) using square roots. So, for the above examples it would generate sqrt (x) *

Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-08 Thread Richard Biener
On Fri, May 1, 2015 at 6:02 PM, Kyrill Tkachov kyrylo.tkac...@foss.arm.com wrote: Hi all, GCC has some logic to expand calls to pow (x, 0.75), pow (0.25) and pow (x, (int)k + 0.5) using square roots. So, for the above examples it would generate sqrt (x) * sqrt (sqrt (x)), sqrt (sqrt (x))

Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-08 Thread Kyrill Tkachov
On 08/05/15 14:56, Kyrill Tkachov wrote: On 08/05/15 11:18, Richard Biener wrote: On Fri, May 1, 2015 at 6:02 PM, Kyrill Tkachov kyrylo.tkac...@foss.arm.com wrote: Hi all, GCC has some logic to expand calls to pow (x, 0.75), pow (0.25) and pow (x, (int)k + 0.5) using square roots. So, for

Re: [PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-08 Thread Kyrill Tkachov
On 08/05/15 11:18, Richard Biener wrote: On Fri, May 1, 2015 at 6:02 PM, Kyrill Tkachov kyrylo.tkac...@foss.arm.com wrote: Hi all, GCC has some logic to expand calls to pow (x, 0.75), pow (0.25) and pow (x, (int)k + 0.5) using square roots. So, for the above examples it would generate sqrt

[PATCH][tree-ssa-math-opts] Expand pow (x, CONST) using square roots when possible

2015-05-01 Thread Kyrill Tkachov
Hi all, GCC has some logic to expand calls to pow (x, 0.75), pow (0.25) and pow (x, (int)k + 0.5) using square roots. So, for the above examples it would generate sqrt (x) * sqrt (sqrt (x)), sqrt (sqrt (x)) and powi (x, k) * sqrt (x) (assuming k 0. For k 0 it will calculate the reciprocal