[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 01:10:43 PDT 2021
- Previous message: [PATCH] D109953: [X86] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)
- Next message: [PATCH] D109953: [X86] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
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 {
----------------
I think we can use `bool IsConj`, `SDValue MulOp0, MulOp0` instead of `CFmul`. Then you don't need to create a temp mul node.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:47529-47530
+ if (Op0.hasOneUse() && AllowContract(Op0.getNode())) {
+ if ((Opcode == X86ISD::VFMULC || Opcode == X86ISD::VFCMULC))
+ CFmul = Op0;
+ else if ((Opcode == X86ISD::VFMADDC || Opcode == X86ISD::VFCMADDC) &&
----------------
Better to add parentheses.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109953/new/
https://reviews.llvm.org/D109953
- Previous message: [PATCH] D109953: [X86] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)
- Next message: [PATCH] D109953: [X86] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list