[PATCH] D39931: AMDGPU: Don't try to enable fp64 denormals on <SI
Jan Vesely via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 10 16:54:57 PST 2017
jvesely created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.
Passing +fp64-fp16-denormal feature enables fp64 even on asics that don't support it
Repository:
rL LLVM
https://reviews.llvm.org/D39931
Files:
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
Index: lib/Target/AMDGPU/AMDGPUSubtarget.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+++ lib/Target/AMDGPU/AMDGPUSubtarget.cpp
@@ -48,10 +48,20 @@
// for SI has the unhelpful behavior that it unsets everything else if you
// disable it.
- SmallString<256> FullFS("+promote-alloca,+fp64-fp16-denormals,+dx10-clamp,+load-store-opt,");
+ SmallString<256> FullFS("+promote-alloca,+dx10-clamp,+load-store-opt,");
+
if (isAmdHsaOS()) // Turn on FlatForGlobal for HSA.
FullFS += "+flat-address-space,+flat-for-global,+unaligned-buffer-access,+trap-handler,";
+ // FIXME: I don't think think Evergreen has any useful support for
+ // denormals, but should be checked. Should we issue a warning somewhere
+ // if someone tries to enable these?
+ if (getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS) {
+ FullFS += "+fp64-fp16-denormals,";
+ } else {
+ FullFS += "-fp64-fp16-denormals,-fp32-denormals,";
+ }
+
FullFS += FS;
ParseSubtargetFeatures(GPU, FullFS);
@@ -63,14 +73,6 @@
FlatForGlobal = true;
}
- // FIXME: I don't think think Evergreen has any useful support for
- // denormals, but should be checked. Should we issue a warning somewhere
- // if someone tries to enable these?
- if (getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS) {
- FP64FP16Denormals = false;
- FP32Denormals = false;
- }
-
// Set defaults if needed.
if (MaxPrivateElementSize == 0)
MaxPrivateElementSize = 4;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39931.122558.patch
Type: text/x-patch
Size: 1531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171111/0168525b/attachment.bin>
More information about the llvm-commits
mailing list