aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/TargetLibraryInfo.cpp
diff options
context:
space:
mode:
authorNicolai Hahnle <nhaehnle@gmail.com>2015-12-15 17:24:15 +0000
committerNicolai Hahnle <nhaehnle@gmail.com>2015-12-15 17:24:15 +0000
commit78fd4f087b0832bdfef1c7db54bc234002e2ff30 (patch)
treeee4aa587893ee78d39d2ff516ba4bf67dd358d0c /llvm/lib/Analysis/TargetLibraryInfo.cpp
parent8f307217c3887087f22f3bef30bbdeeb00ee5299 (diff)
downloadllvm-78fd4f087b0832bdfef1c7db54bc234002e2ff30.zip
llvm-78fd4f087b0832bdfef1c7db54bc234002e2ff30.tar.gz
llvm-78fd4f087b0832bdfef1c7db54bc234002e2ff30.tar.bz2
AMDGPU: mark ldexp LibCalls as unavailable
Summary: The LibCallSimplifier will turn llvm.exp2.* intrinsics into ldexp* libcalls which do not make sense with the AMDGPU backend. In the long run, we'll want an llvm.ldexp.* intrinsic to properly make use of this optimization, but this works around the problem for now. See also: http://reviews.llvm.org/D14327 (suggested llvm.ldexp.* implementation) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92709 Reviewers: arsenm, tstellarAMD Differential Revision: http://reviews.llvm.org/D14990 llvm-svn: 255658
Diffstat (limited to 'llvm/lib/Analysis/TargetLibraryInfo.cpp')
-rw-r--r--llvm/lib/Analysis/TargetLibraryInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 845ca05..e00f4ae 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -61,6 +61,13 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
}
#endif // !NDEBUG
+ if (T.getArch() == Triple::r600 ||
+ T.getArch() == Triple::amdgcn) {
+ TLI.setUnavailable(LibFunc::ldexp);
+ TLI.setUnavailable(LibFunc::ldexpf);
+ TLI.setUnavailable(LibFunc::ldexpl);
+ }
+
// There are no library implementations of mempcy and memset for AMD gpus and
// these can be difficult to lower in the backend.
if (T.getArch() == Triple::r600 ||