[PATCH] D107551: [DAGCombine] Add node level checks for fp-contract and fp-ninf in visitFMULForFMADistributiveCombine().

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 5 16:59:11 PDT 2021


arsenm added a comment.

In D107551#2928034 <https://reviews.llvm.org/D107551#2928034>, @RKSimon wrote:

> This patch has no description summary at all :( What's the background to this? Is it related to PR51346 / D74436 <https://reviews.llvm.org/D74436>?

This is migrating to using the instruction granularity fast math flags instead of the function level fast math attributes, it's unrelated to PR51346



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13015-13017
+bool hasNoInfs(const TargetOptions &Options, SDValue N) {
+  return Options.NoInfsFPMath || N.getNode()->getFlags().hasNoInfs();
+}
----------------
I swear we had a utility for this already somewhere


================
Comment at: llvm/test/CodeGen/AMDGPU/fma.ll:149
+; FUNC-LABEL: {{^}}fold_fmul_distributive:
+; GFX906: v_fmac_f32_e32 v0, v1, v0
+define float @fold_fmul_distributive(float %x, float %y) {
----------------
Probably should add check lines for the other targets, and add a comment describing the test


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