[llvm-dev] Handling of FP denormal values
Matt Arsenault via llvm-dev
llvm-dev at lists.llvm.org
Mon Sep 16 18:43:18 PDT 2019
> On Sep 16, 2019, at 19:57, Kaylor, Andrew via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
>
> Do we need an ftz fast-math flag?
This would be useful for matching a handful of AMDGPU instructions (a fmad that only always flushes being the most important). We have a dedicated intrinsic to allow flushing in this case when denormals are enabled
>
> Are there any other facets to this problem that I've overlooked?
For AMDGPU we need to split -denormal-fp-math into per-FP type flags (and the corresponding IR attribute). The denorm mode register has separate fields for f32, and f64+f16. The default for each of these is different depending on the subtarget/language combination. Mostly we want f64+f16 to always be on, and only change the f32 mode. The current naming implies changing all of the modes.
The different sign of 0 modes as exist now aren’t available. There are however separate flags for enabling flushing on input and output. This isn’t particular important, and currently we just set both bits at the same time but it might be something to think about if this is being expanded.
-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190916/87e3a6ee/attachment.html>
More information about the llvm-dev
mailing list