[llvm] r272664 - AMDGPU: mark {exp, log}10{, f, l} library functions as unavailable

Nicolai Haehnle via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 06:14:54 PDT 2016


Author: nha
Date: Tue Jun 14 08:14:53 2016
New Revision: 272664

URL: http://llvm.org/viewvc/llvm-project?rev=272664&view=rev
Log:
AMDGPU: mark {exp,log}10{,f,l} library functions as unavailable

Summary:
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

Reviewers: arsenm, tstellarAMD

Subscribers: llvm-commits, kzhuravl

Differential Revision: http://reviews.llvm.org/D21282

Modified:
    llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp

Modified: llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp?rev=272664&r1=272663&r2=272664&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp Tue Jun 14 08:14:53 2016
@@ -65,6 +65,12 @@ static void initialize(TargetLibraryInfo
     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




More information about the llvm-commits mailing list