Re: Replace FMA_EXPR with one internal fn per optab

2018-05-23 Thread Richard Sandiford
"H.J. Lu" writes: > On Thu, May 17, 2018 at 1:56 AM, Richard Sandiford > wrote: >> Richard Biener writes: @@ -2698,23 +2703,26 @@ convert_mult_to_fma_1 (tree mul_result, } >>> if (negate_p) - mulop1 = force_gimple_operand_gsi (&gsi, -

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-22 Thread H.J. Lu
On Thu, May 17, 2018 at 1:56 AM, Richard Sandiford wrote: > Richard Biener writes: >>> @@ -2698,23 +2703,26 @@ convert_mult_to_fma_1 (tree mul_result, >>> } >> >>> if (negate_p) >>> - mulop1 = force_gimple_operand_gsi (&gsi, >>> - bu

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-17 Thread Richard Biener
On Thu, May 17, 2018 at 10:56 AM Richard Sandiford < richard.sandif...@linaro.org> wrote: > Richard Biener writes: > >> @@ -2698,23 +2703,26 @@ convert_mult_to_fma_1 (tree mul_result, > >> } > > > >> if (negate_p) > >> - mulop1 = force_gimple_operand_gsi (&gsi, > >> -

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-17 Thread Richard Sandiford
Richard Biener writes: >> @@ -2698,23 +2703,26 @@ convert_mult_to_fma_1 (tree mul_result, >> } > >> if (negate_p) >> - mulop1 = force_gimple_operand_gsi (&gsi, >> - build1 (NEGATE_EXPR, >> -

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-15 Thread Martin Jambor
Hi, On Fri, May 11 2018, Richard Sandiford wrote: > There are four optabs for various forms of fused multiply-add: > fma, fms, fnma and fnms. Of these, only fma had a direct gimple > representation. For the other three we relied on special pattern- > matching during expand, although tree-ssa-mat

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-15 Thread Richard Biener
On Fri, May 11, 2018 at 7:15 PM Richard Sandiford < richard.sandif...@linaro.org> wrote: > There are four optabs for various forms of fused multiply-add: > fma, fms, fnma and fnms. Of these, only fma had a direct gimple > representation. For the other three we relied on special pattern- > matchi

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-11 Thread Richard Sandiford
Andrew Pinski writes: > On Fri, May 11, 2018 at 11:04 AM, Richard Sandiford > wrote: >> Andrew Pinski writes: >>> On Fri, May 11, 2018 at 10:15 AM, Richard Sandiford >>> wrote: There are four optabs for various forms of fused multiply-add: fma, fms, fnma and fnms. Of these, only fma

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-11 Thread Andrew Pinski
On Fri, May 11, 2018 at 11:04 AM, Richard Sandiford wrote: > Andrew Pinski writes: >> On Fri, May 11, 2018 at 10:15 AM, Richard Sandiford >> wrote: >>> There are four optabs for various forms of fused multiply-add: >>> fma, fms, fnma and fnms. Of these, only fma had a direct gimple >>> represen

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-11 Thread Richard Sandiford
Andrew Pinski writes: > On Fri, May 11, 2018 at 10:15 AM, Richard Sandiford > wrote: >> There are four optabs for various forms of fused multiply-add: >> fma, fms, fnma and fnms. Of these, only fma had a direct gimple >> representation. For the other three we relied on special pattern- >> match

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-11 Thread Andrew Pinski
On Fri, May 11, 2018 at 10:15 AM, Richard Sandiford wrote: > There are four optabs for various forms of fused multiply-add: > fma, fms, fnma and fnms. Of these, only fma had a direct gimple > representation. For the other three we relied on special pattern- > matching during expand, although tre

Replace FMA_EXPR with one internal fn per optab

2018-05-11 Thread Richard Sandiford
There are four optabs for various forms of fused multiply-add: fma, fms, fnma and fnms. Of these, only fma had a direct gimple representation. For the other three we relied on special pattern- matching during expand, although tree-ssa-math-opts.c did have some code to try to second-guess what exp