Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / AArch64 / sme-intrinsics / acle_sme_cnt.c
blobc0b3e1a06b0ffe0d40c6f49f7b0a9311d0b53c62
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -O1 -Werror -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,CHECK-C
4 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK,CHECK-CXX
5 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -O1 -Werror -o /dev/null %s
7 #include <arm_sme.h>
9 // CHECK-C-LABEL: define dso_local i64 @test_svcntsb(
10 // CHECK-C-SAME: ) local_unnamed_addr #[[ATTR0:[0-9]+]] {
11 // CHECK-C-NEXT: entry:
12 // CHECK-C-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sme.cntsb()
13 // CHECK-C-NEXT: ret i64 [[TMP0]]
15 // CHECK-CXX-LABEL: define dso_local noundef i64 @_Z12test_svcntsbv(
16 // CHECK-CXX-SAME: ) local_unnamed_addr #[[ATTR0:[0-9]+]] {
17 // CHECK-CXX-NEXT: entry:
18 // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sme.cntsb()
19 // CHECK-CXX-NEXT: ret i64 [[TMP0]]
21 uint64_t test_svcntsb() {
22 return svcntsb();
25 // CHECK-C-LABEL: define dso_local i64 @test_svcntsh(
26 // CHECK-C-SAME: ) local_unnamed_addr #[[ATTR0]] {
27 // CHECK-C-NEXT: entry:
28 // CHECK-C-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sme.cntsh()
29 // CHECK-C-NEXT: ret i64 [[TMP0]]
31 // CHECK-CXX-LABEL: define dso_local noundef i64 @_Z12test_svcntshv(
32 // CHECK-CXX-SAME: ) local_unnamed_addr #[[ATTR0]] {
33 // CHECK-CXX-NEXT: entry:
34 // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sme.cntsh()
35 // CHECK-CXX-NEXT: ret i64 [[TMP0]]
37 uint64_t test_svcntsh() {
38 return svcntsh();
41 // CHECK-C-LABEL: define dso_local i64 @test_svcntsw(
42 // CHECK-C-SAME: ) local_unnamed_addr #[[ATTR0]] {
43 // CHECK-C-NEXT: entry:
44 // CHECK-C-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sme.cntsw()
45 // CHECK-C-NEXT: ret i64 [[TMP0]]
47 // CHECK-CXX-LABEL: define dso_local noundef i64 @_Z12test_svcntswv(
48 // CHECK-CXX-SAME: ) local_unnamed_addr #[[ATTR0]] {
49 // CHECK-CXX-NEXT: entry:
50 // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sme.cntsw()
51 // CHECK-CXX-NEXT: ret i64 [[TMP0]]
53 uint64_t test_svcntsw() {
54 return svcntsw();
57 // CHECK-C-LABEL: define dso_local i64 @test_svcntsd(
58 // CHECK-C-SAME: ) local_unnamed_addr #[[ATTR0]] {
59 // CHECK-C-NEXT: entry:
60 // CHECK-C-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sme.cntsd()
61 // CHECK-C-NEXT: ret i64 [[TMP0]]
63 // CHECK-CXX-LABEL: define dso_local noundef i64 @_Z12test_svcntsdv(
64 // CHECK-CXX-SAME: ) local_unnamed_addr #[[ATTR0]] {
65 // CHECK-CXX-NEXT: entry:
66 // CHECK-CXX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.aarch64.sme.cntsd()
67 // CHECK-CXX-NEXT: ret i64 [[TMP0]]
69 uint64_t test_svcntsd() {
70 return svcntsd();
72 //// NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
73 // CHECK: {{.*}}