[PATCH] D108619: [DAGCombine] Allow FMA combine with both FMA and FMAD
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 27 02:56:30 PDT 2021
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13107
+ SDValue CDE = DAG.getNode(FMA.getOpcode(), SL, VT, C, D, E);
+ return DAG.getNode(FMA.getOpcode(), SL, VT, A, B, CDE);
}
----------------
On second thoughts, perhaps there's no point trying to preserve the original opcode for the `A*B+something` part, because the `something` is different, so it's impossible to retain the (fused vs unfused) rounding behaviour of the original opcode.
So perhaps your original approach of using `DAG.getNode(PreferredFusedOpcode, ...)` everywhere is the best we can do. Sorry for the noise.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108619/new/
https://reviews.llvm.org/D108619
More information about the llvm-commits
mailing list