[PATCH] D48493: [HIP] Support flush denorms bitcode
Aaron Enye Shi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 22 10:33:06 PDT 2018
ashi1 created this revision.
ashi1 added a reviewer: yaxunl.
ashi1 added projects: clang, AMDGPU.
Herald added a subscriber: cfe-commits.
We need to use oclc_daz_opt_on.amdgcn.bc bitcode when option fcuda-flush-denormal-to-zero is enabled for HIP.
Repository:
rC Clang
https://reviews.llvm.org/D48493
Files:
lib/Driver/ToolChains/HIP.cpp
Index: lib/Driver/ToolChains/HIP.cpp
===================================================================
--- lib/Driver/ToolChains/HIP.cpp
+++ lib/Driver/ToolChains/HIP.cpp
@@ -75,10 +75,16 @@
std::string ISAVerBC =
"oclc_isa_version_" + SubArchName.drop_front(3).str() + ".amdgcn.bc";
+ std::string OCLC_daz_opt;
+ if (Args.hasArg(options::OPT_fcuda_flush_denormals_to_zero))
+ OCLC_daz_opt = "oclc_daz_opt_on.amdgcn.bc";
+ else
+ OCLC_daz_opt = "oclc_daz_opt_off.amdgcn.bc";
+
BCLibs.append({"opencl.amdgcn.bc",
"ockl.amdgcn.bc", "irif.amdgcn.bc", "ocml.amdgcn.bc",
"oclc_finite_only_off.amdgcn.bc",
- "oclc_daz_opt_off.amdgcn.bc",
+ OCLC_daz_opt,
"oclc_correctly_rounded_sqrt_on.amdgcn.bc",
"oclc_unsafe_math_off.amdgcn.bc", ISAVerBC});
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48493.152508.patch
Type: text/x-patch
Size: 917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180622/7dc864c4/attachment.bin>
More information about the cfe-commits
mailing list