aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/TargetLibraryInfo.cpp
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2015-10-28 17:50:23 +0000
committerJF Bastien <jfb@google.com>2015-10-28 17:50:23 +0000
commitddaa1c7eb13f6c8177b880c46cd2ea28bb5917be (patch)
treefffd6086819e4e668e61581cfddb26f430bbe926 /llvm/lib/Analysis/TargetLibraryInfo.cpp
parentc432c8f856e0bd84de980a9d9bb2d31b06fa95b1 (diff)
downloadllvm-ddaa1c7eb13f6c8177b880c46cd2ea28bb5917be.zip
llvm-ddaa1c7eb13f6c8177b880c46cd2ea28bb5917be.tar.gz
llvm-ddaa1c7eb13f6c8177b880c46cd2ea28bb5917be.tar.bz2
WebAssembly: disable some loop-idiom recognition
memset/memcpy aren't fully supported yet. We should invert this test once they are supported. llvm-svn: 251534
Diffstat (limited to 'llvm/lib/Analysis/TargetLibraryInfo.cpp')
-rw-r--r--llvm/lib/Analysis/TargetLibraryInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 635c50c..39af09e 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -64,7 +64,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
// 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 ||
- T.getArch() == Triple::amdgcn) {
+ T.getArch() == Triple::amdgcn ||
+ T.getArch() == Triple::wasm32 ||
+ T.getArch() == Triple::wasm64) {
TLI.setUnavailable(LibFunc::memcpy);
TLI.setUnavailable(LibFunc::memset);
TLI.setUnavailable(LibFunc::memset_pattern16);