[PATCH] D108619: [DAGCombine] Allow FMA combine with both FMA and FMAD
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 25 03:08:40 PDT 2021
foad 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);
+ };
----------------
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;`?
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