[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / aarch64-mops.c
blobc0f151837c75179cd53726acf425c17dae926448
1 // RUN: %clang_cc1 -triple aarch64-arm-unknown-eabi -Wno-int-conversion -target-feature +mops -target-feature +mte -w -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-MOPS %s
2 // RUN: not %clang_cc1 -triple aarch64-arm-unknown-eabi -Wno-int-conversion -target-feature +mops -Wno-implicit-function-declaration -w -S -emit-llvm -o - %s 2>&1 | FileCheck --check-prefix=CHECK-NOMOPS %s
3 // RUN: not %clang_cc1 -triple aarch64-arm-unknown-eabi -Wno-int-conversion -Wno-implicit-function-declaration -target-feature +mte -w -S -emit-llvm -o - %s 2>&1 | FileCheck --check-prefix=CHECK-NOMOPS %s
4 // RUN: not %clang_cc1 -triple aarch64-arm-unknown-eabi -Wno-int-conversion -Wno-implicit-function-declaration -w -S -emit-llvm -o - %s 2>&1 | FileCheck --check-prefix=CHECK-NOMOPS %s
6 #include <arm_acle.h>
7 #include <stddef.h>
9 // CHECK-LABEL: @bzero_0(
10 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
11 // CHECK-NOMOPS: '__builtin_arm_mops_memset_tag' needs target feature mte,mops
12 void *bzero_0(void *dst) {
13 return __arm_mops_memset_tag(dst, 0, 0);
16 // CHECK-LABEL: @bzero_1(
17 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
18 void *bzero_1(void *dst) {
19 return __arm_mops_memset_tag(dst, 0, 1);
22 // CHECK-LABEL: @bzero_10(
23 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
24 void *bzero_10(void *dst) {
25 return __arm_mops_memset_tag(dst, 0, 10);
28 // CHECK-LABEL: @bzero_10000(
29 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
30 void *bzero_10000(void *dst) {
31 return __arm_mops_memset_tag(dst, 0, 10000);
34 // CHECK-LABEL: @bzero_n(
35 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
36 void *bzero_n(void *dst, size_t size) {
37 return __arm_mops_memset_tag(dst, 0, size);
40 // CHECK-LABEL: @memset_0(
41 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
42 void *memset_0(void *dst, int value) {
43 return __arm_mops_memset_tag(dst, value, 0);
46 // CHECK-LABEL: @memset_1(
47 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
48 void *memset_1(void *dst, int value) {
49 return __arm_mops_memset_tag(dst, value, 1);
52 // CHECK-LABEL: @memset_10(
53 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
54 void *memset_10(void *dst, int value) {
55 return __arm_mops_memset_tag(dst, value, 10);
58 // CHECK-LABEL: @memset_10000(
59 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
60 void *memset_10000(void *dst, int value) {
61 return __arm_mops_memset_tag(dst, value, 10000);
64 // CHECK-LABEL: @memset_n(
65 // CHECK-MOPS: @llvm.aarch64.mops.memset.tag
66 void *memset_n(void *dst, int value, size_t size) {
67 return __arm_mops_memset_tag(dst, value, size);