summaryrefslogtreecommitdiff
path: root/lib/Target/TargetLibraryInfo.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-04-02 19:53:29 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-04-02 19:53:29 +0000
commitadb852ddf340dd294b7db930bab12ed1d1af917b (patch)
tree7e255ebb0d36e148d36d044bb5c2057089b23b46 /lib/Target/TargetLibraryInfo.cpp
parentbc07242d9ba2230210d09b3014de14e0746e13cd (diff)
downloadllvm-adb852ddf340dd294b7db930bab12ed1d1af917b.tar.gz
llvm-adb852ddf340dd294b7db930bab12ed1d1af917b.tar.bz2
llvm-adb852ddf340dd294b7db930bab12ed1d1af917b.tar.xz
TargetLibraryInfo: Disable memcpy and memset on R600
There are no implementations of these for R600. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205455 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLibraryInfo.cpp')
-rw-r--r--lib/Target/TargetLibraryInfo.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Target/TargetLibraryInfo.cpp b/lib/Target/TargetLibraryInfo.cpp
index 7f8919772f..6ec0b1f929 100644
--- a/lib/Target/TargetLibraryInfo.cpp
+++ b/lib/Target/TargetLibraryInfo.cpp
@@ -378,7 +378,16 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
llvm_unreachable("TargetLibraryInfo function names must be sorted");
}
#endif // !NDEBUG
-
+
+ // There are no library implementations of mempcy and memset for r600 and
+ // these can be difficult to lower in the backend.
+ if (T.getArch() == Triple::r600) {
+ TLI.setUnavailable(LibFunc::memcpy);
+ TLI.setUnavailable(LibFunc::memset);
+ TLI.setUnavailable(LibFunc::memset_pattern16);
+ return;
+ }
+
// memset_pattern16 is only available on iOS 3.0 and Mac OS X 10.5 and later.
if (T.isMacOSX()) {
if (T.isMacOSXVersionLT(10, 5))