[PATCH] D109953: [X86] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 17 02:28:58 PDT 2021


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:47522
   SDValue RHS = N->getOperand(1);
   SDValue CFmul, FAddOp1;
+  auto GetCFmulFrom = [&CFmul, &AllowContract, &DAG](SDValue N) -> bool {
----------------
LiuChen3 wrote:
> pengfei wrote:
> > I think we can use `bool IsConj`, `SDValue MulOp0, MulOp0` instead of `CFmul`. Then you don't need to create a temp mul node.
> It seems we create more temp node. Is it better?
They are temp variables rather than nodes. And compiler may likly optimize them.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109953



More information about the llvm-commits mailing list