| 1 | // REQUIRES: aarch64-registered-target |
| 2 | |
| 3 | // RUN: %clang_cc1 -triple arm64-windows -O1 \ |
| 4 | // RUN: -fms-compatibility -fms-compatibility-version=17.00 \ |
| 5 | // RUN: -ffreestanding -fsyntax-only -Werror \ |
| 6 | // RUN: -isystem %S/Inputs/include %s -S -o - -emit-llvm 2>&1 \ |
| 7 | // RUN: | FileCheck %s |
| 8 | |
| 9 | #include <intrin.h> |
| 10 | |
| 11 | void check_nop() { |
| 12 | // CHECK: "nop" |
| 13 | __nop(); |
| 14 | } |
| 15 | |
| 16 | unsigned short check_byteswap_ushort(unsigned short val) { |
| 17 | // CHECK: call i16 @_byteswap_ushort(i16 %val) |
| 18 | return _byteswap_ushort(val); |
| 19 | } |
| 20 | |
| 21 | unsigned long check_byteswap_ulong(unsigned long val) { |
| 22 | // CHECK: call i32 @_byteswap_ulong(i32 %val) |
| 23 | return _byteswap_ulong(val); |
| 24 | } |
| 25 | |
| 26 | unsigned __int64 check_byteswap_uint64(unsigned __int64 val) { |
| 27 | // CHECK: call i64 @_byteswap_uint64(i64 %val) |
| 28 | return _byteswap_uint64(val); |
| 29 | } |
| 30 | |