[PATCH] D107551: [DAGCombine] Add node level checks for fp-contract and fp-ninf in visitFMULForFMADistributiveCombine().
Abinav Puthan Purayil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 10 20:58:07 PDT 2021
abinavpp added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13073-13077
auto isContractableFMUL = [AllowFusionGlobally](SDValue N) {
if (N.getOpcode() != ISD::FMUL)
return false;
return AllowFusionGlobally || N->getFlags().hasAllowContract();
};
----------------
spatel wrote:
> I think this is the existing code that we're remembering. This seems to be pulling in one more clause for FMA/FMAD - probably want to do that too for this patch?
Oh, I thought we were talking about hasNoInfs(), the isContractibleFMUL() is copied from this lambda-expression. I removed the dependence on HasFMAD since it's checking if a target supports FMAD. HasFMA does the same for FMA. I feel isContractibleFMUL() should strictly check for FP-environment and not worry about target specific details.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107551/new/
https://reviews.llvm.org/D107551
More information about the llvm-commits
mailing list