summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit36a031870bb98f220e4a2e467b3f10de10080509 (patch)
tree3b0b4038478c69ffd2ed4dfa7d73aee008500ab0 /llvm/lib/Target/TargetLibraryInfo.cpp
parent0f58c7cc3a2081f1a21549f71dcfac07ca8d1713 (diff)
downloadbcm5719-llvm-36a031870bb98f220e4a2e467b3f10de10080509.tar.gz
bcm5719-llvm-36a031870bb98f220e4a2e467b3f10de10080509.zip
TargetLibraryInfo: Disable memcpy and memset on R600
There are no implementations of these for R600. llvm-svn: 205455
Diffstat (limited to 'llvm/lib/Target/TargetLibraryInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetLibraryInfo.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetLibraryInfo.cpp b/llvm/lib/Target/TargetLibraryInfo.cpp
index 7f8919772f7..6ec0b1f929c 100644
--- a/llvm/lib/Target/TargetLibraryInfo.cpp
+++ b/llvm/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))
OpenPOWER on IntegriCloud