This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to gimplify_build a FMA_EXPR since it was removed?


On Mon, Feb 4, 2019 at 4:47 AM Laurent Thévenoux <lrnt@thvnx.com> wrote:
>
> Sorry for duplicate, gcc-help was not the right mailing list for this one.
>
>
> -------- Original Message --------
> Subject: How to gimplify_build a FMA_EXPR since it was removed?
> Date: Monday, February 04, 2019 13:28 CET
> From: Laurent Thévenoux <lrnt@thvnx.com>
> To: gcc-help@gcc.gnu.org
> CC: richard.sandiford@linaro.org
>
>
>
> Hi,
>
> I've developed some code in gcc/tree-complex.c. I was using the
> FMA_EXPR to generate fma operations such as in:
>
> ```
> rr  = gimplify_build3 (gsi, FMA_EXPR, inner_type, ai, ai, p1r);```
>
> FMA_EXPR was removed in https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00570.html.
>
> Is there an easy way to gimplify FMAs with the new functions
> introduced in the patch below?

From that patch (e.g. rs6000_gimple_fold_builtin):

- gimple *g = gimple_build_assign (lhs, FMA_EXPR, arg0, arg1, arg2);
+ gcall *g = gimple_build_call_internal (IFN_FMA, 3, arg0, arg1, arg2);
+ gimple_call_set_lhs (g, lhs);
+ gimple_call_set_nothrow (g, true);


Thanks,
Andrew Pinski


>
> Thanks,
> Laurent
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]