[PATCH] D27028: Add intrinsics for constrained floating point operations

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 11:32:10 PST 2016


arsenm added a comment.

In https://reviews.llvm.org/D27028#604609, @andrew.w.kaylor wrote:

> In https://reviews.llvm.org/D27028#604603, @hfinkel wrote:
>
> > In https://reviews.llvm.org/D27028#604594, @arsenm wrote:
> >
> > > As I mentioned at the meeting I think these need a way to control whether denormals are flushed or not
> >
> >
> > You mean that there should be a way to control this on a per-operation basis, or there should be some way to represent that the user might be changing some thread state that controls how this is done?
>
>
> I was going to ask that same question.
>
> For the purposes of these intrinsics, we only need enough information to control how optimization passes will handle these instructions.  I suppose a transformation like constant folding could theoretically have something to flush to zero.  Does it make sense to treat that as a set of new rounding mode, like LLVM_ROUND_TONEAREST_FTZ, etc.?


Yes, I think it makes sense to treat it the same as a rounding mode. For lowering some of these operations, we would need to change the denormal mode for some subsequence of the lowering. Some of the OpenCL library builtin functions also need to do this, and need to be able to control this via the intrinsic.


Repository:
  rL LLVM

https://reviews.llvm.org/D27028





More information about the llvm-commits mailing list