[PATCH] D21282: AMDGPU: mark {exp, log}10{, f, l} library functions as unavailable

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 02:06:39 PDT 2016


nhaehnle created this revision.
nhaehnle added reviewers: arsenm, tstellarAMD.
nhaehnle added a subscriber: llvm-commits.
Herald added a subscriber: kzhuravl.

The SimplifyLibCalls part of InstCombine generates calls to those otherwise.

I wonder if at some point we shouldn't just call disableAllFunctions() and
then enable functions on a whitelist basis...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96495

http://reviews.llvm.org/D21282

Files:
  lib/Analysis/TargetLibraryInfo.cpp

Index: lib/Analysis/TargetLibraryInfo.cpp
===================================================================
--- lib/Analysis/TargetLibraryInfo.cpp
+++ lib/Analysis/TargetLibraryInfo.cpp
@@ -65,6 +65,12 @@
     TLI.setUnavailable(LibFunc::ldexp);
     TLI.setUnavailable(LibFunc::ldexpf);
     TLI.setUnavailable(LibFunc::ldexpl);
+    TLI.setUnavailable(LibFunc::exp10);
+    TLI.setUnavailable(LibFunc::exp10f);
+    TLI.setUnavailable(LibFunc::exp10l);
+    TLI.setUnavailable(LibFunc::log10);
+    TLI.setUnavailable(LibFunc::log10f);
+    TLI.setUnavailable(LibFunc::log10l);
   }
 
   // There are no library implementations of mempcy and memset for AMD gpus and


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21282.60496.patch
Type: text/x-patch
Size: 670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160613/b3cf2318/attachment.bin>


More information about the llvm-commits mailing list