[PATCH] D48573: [AMDGPU] Add llvm.amdgcn.fmad.ftz intrinsic

Artem Tamazov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 10:17:19 PDT 2018


artem.tamazov reopened this revision.
artem.tamazov added a comment.
This revision is now accepted and ready to land.

Perhaps fixes needed.



================
Comment at: include/llvm/IR/IntrinsicsAMDGPU.td:364
+// v_mad_f32/v_mac_f32, selected regardless of denorm support.
+def int_amdgcn_fmad_ftz :
+  Intrinsic<[llvm_float_ty],
----------------
rampitec wrote:
> rampitec wrote:
> > arsenm wrote:
> > > rampitec wrote:
> > > > arsenm wrote:
> > > > > Does v_mad_f16 flush denormals? I don't think it does
> > > > It does. It cannot preserve denormals. It is even lowered into FMAD_FTZ, which is lowered to mad. The new part is this intrinsic sitting above the existing SDNode.
> > > In that case I would make this intrinsic type mangled and make it work for f16 as well
> > AFAIR f16 does not flush.
> Sorry for confusion: v_mad_f32 flushes. v_mad_f16 does not. That is why it is not overloaded.
According to SCDevUtil/SCMathengine, V_MAD_F16 always flushes HP denormals. Please double-check.


Repository:
  rL LLVM

https://reviews.llvm.org/D48573





More information about the llvm-commits mailing list