[PATCH] D107551: [DAGCombine] Add node level checks for fp-contract and fp-ninf in visitFMULForFMADistributiveCombine().
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 9 09:58:49 PDT 2021
spatel 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();
};
----------------
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?
================
Comment at: llvm/test/CodeGen/X86/fma-scalar-combine.ll:567
+; CHECK: # %bb.0:
+; CHECK-NEXT: vfmadd231ss %xmm0, %xmm1, %xmm0
+ %fadd = fadd ninf float %y, 1.0
----------------
Not sure if you manually created these check lines or removed the CHECK for a 'ret' line, but it's better to leave that in for easier updating. If you can pre-commit this test with the current (baseline) CHECKs, that would be even better.
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