[PATCH] D126273: [DAGCombiner][VP] Add DAGCombine for merging VP_FADD and VP_FMUL to VP_FMA.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 08:08:06 PDT 2022


craig.topper added a comment.

In D126273#3533580 <https://reviews.llvm.org/D126273#3533580>, @liaolucy wrote:

> When I test tsvc.
>
> The IR is:
>
>   @llvm.fmuladd.nxv2f32(<vscale x 2 x float>.....
>
> Not
>
>   @llvm.riscv.vfmul.nxv2f32.nxv2f32(<vscale x 2 x float> ......
>   @llvm.riscv.vfadd.nxv2f32.nxv2f32(<vscale x 2 x float> ......
>    
>
> So I am not sure, we need merge vp.fmul and vp.fadd to vp.fma.  maybe vp.fma is enough?

fmuladd is use with -ffp-contract=on(the default). fmul+fadd is used with -ffast-math or -ffp-contract=fast or -Ofast.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126273/new/

https://reviews.llvm.org/D126273



More information about the llvm-commits mailing list