[PATCH] D84516: [AMDGPU] Use fma for lowering frem

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 05:54:48 PDT 2020


arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.

If it doesn’t actually help accuracy, maybe it should check for fast FMA



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:2092
   SDValue Div = DAG.getNode(ISD::FDIV, SL, VT, X, Y);
   SDValue Floor = DAG.getNode(ISD::FTRUNC, SL, VT, Div);
+  SDValue Neg = DAG.getNode(ISD::FNEG, SL, VT, Floor);
----------------
Could rename floor to trunc


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84516/new/

https://reviews.llvm.org/D84516





More information about the llvm-commits mailing list