[PATCH] D67406: [TLI][AMDGPU] AMDPAL does not have tan function

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 09:34:11 PDT 2019


tpr marked an inline comment as done.
tpr added inline comments.


================
Comment at: lib/Analysis/TargetLibraryInfo.cpp:117-118
     TLI.setUnavailable(LibFunc_log10l);
+    // For PAL OS, we do not have a tan function.
+    if (T.getOS() == Triple::AMDPAL) {
+      TLI.setUnavailable(LibFunc_tan);
----------------
arsenm wrote:
> This isn't a frontend specific property. Nothing has a library in the sense this means
Well, in other respects, we're treating "PAL" as an OS, even though it clearly isn't. And it's a property of a real OS what functions the library has, right?

What alternative suggestion do you have to fix it up so that other amdgcn users can do this sin/cos->tan optimization but PAL can't? Should our frontend manually adjust the TLI?

Or should we disable it for all amdgcn users, given that there isn't actually a tan instruction?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67406/new/

https://reviews.llvm.org/D67406





More information about the llvm-commits mailing list