[PATCH] D65620: [AMDGPU] Use S_DENORM_MODE for gfx10
Austin Kerbow via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 17:29:39 PDT 2019
kerbowa marked 2 inline comments as done.
kerbowa added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:7541
+ if (IsGFX10) {
+ int DPDenormDefault = ST->hasFP64Denormals() ? FP_DENORM_FLUSH_NONE
+ : FP_DENORM_FLUSH_IN_FLUSH_OUT;
----------------
rampitec wrote:
> Why GFX10 is different here? It is equally controlled by the subtarget attribute on any ASIC.
I will make it into separate functions like Matt is suggesting so it is more clear.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:7543
+ : FP_DENORM_FLUSH_IN_FLUSH_OUT;
+ SPDenormMode |= DPDenormDefault << 2;
+ }
----------------
rampitec wrote:
> I do not think this is right. When you restore mode you need to check current defaults, FP64Denomals and FP32Denormals. Otherwise you are restoring not what it was before.
This is supposed to return the default for FP64FP16 along with either FP_DENORM_FLUSH_NONE or FP_DENORM_FLUSH_IN_FLUSH_OUT for FP32 based on the `Enable` flag.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65620/new/
https://reviews.llvm.org/D65620
More information about the llvm-commits
mailing list