[PATCH] D108619: [DAGCombine] Allow FMA combine with both FMA and FMAD
Carl Ritson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 25 04:20:50 PDT 2021
critson marked an inline comment as done.
critson added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13056
+ unsigned Opcode = N.getOpcode();
+ return (HasFMA && Opcode == ISD::FMA) || (HasFMAD && Opcode == ISD::FMAD);
+ };
----------------
foad wrote:
> Why do you need the HasFMA and HasFMAD checks here? I can see that you don't want to create //new// FMA instructions if FMA is not legal, but I can't see why you wouldn't want to combine existing FMAs.
>
> In other words can this just be `return Opcode == ISD::FMA || Opcode == ISD::FMAD;`?
Sure, this yields some test changes (instruction count reductions).
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