aboutsummaryrefslogtreecommitdiff
path: root/test/Headers
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2019-01-18 19:46:00 +0000
committerJordan Rupprecht <rupprecht@google.com>2019-01-18 19:46:00 +0000
commit3748d41833787fcbf59cc5624e8d2b042a8991bc (patch)
treef3fcdba7decca7ee845a1bb3f885cb0baa1b4d83 /test/Headers
parent55c8788102d8fd203270fabd6513247b2d7fbd87 (diff)
parente054eb577a1f469b1a4a49fce08572c76e2dddf2 (diff)
Creating branches/google/stable and tags/google/stable/2019-01-18 from r351319
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/google/stable@351578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers')
-rw-r--r--test/Headers/ms-arm64-intrin.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/Headers/ms-arm64-intrin.cpp b/test/Headers/ms-arm64-intrin.cpp
new file mode 100644
index 0000000000..729ca5e7f2
--- /dev/null
+++ b/test/Headers/ms-arm64-intrin.cpp
@@ -0,0 +1,29 @@
+// REQUIRES: aarch64-registered-target
+
+// RUN: %clang_cc1 -triple arm64-windows -O1 \
+// RUN: -fms-compatibility -fms-compatibility-version=17.00 \
+// RUN: -ffreestanding -fsyntax-only -Werror \
+// RUN: -isystem %S/Inputs/include %s -S -o - -emit-llvm 2>&1 \
+// RUN: | FileCheck %s
+
+#include <intrin.h>
+
+void check_nop() {
+// CHECK: "nop"
+ __nop();
+}
+
+unsigned short check_byteswap_ushort(unsigned short val) {
+// CHECK: call i16 @llvm.bswap.i16(i16 %val)
+ return _byteswap_ushort(val);
+}
+
+unsigned long check_byteswap_ulong(unsigned long val) {
+// CHECK: call i32 @llvm.bswap.i32(i32 %val)
+ return _byteswap_ulong(val);
+}
+
+unsigned __int64 check_byteswap_uint64(unsigned __int64 val) {
+// CHECK: call i64 @llvm.bswap.i64(i64 %val)
+ return _byteswap_uint64(val);
+}