Revert "Reland '[flang] Allow to pass an async id to allocate the descriptor (#118713...
[llvm-project.git] / clang / test / CodeGen / AArch64 / tme.cpp
blob0e0cfeed7b75047b25b68764cd2dd233e16b52fb
1 // RUN: %clang_cc1 -triple aarch64 -target-feature +tme -emit-llvm %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -DUSE_ACLE -triple aarch64 -target-feature +tme -emit-llvm %s -o - | FileCheck %s
4 #define A -1
5 constexpr int f() { return 65536; }
7 #ifdef USE_ACLE
8 #include "arm_acle.h"
9 void test_tme_funcs() {
10 __tstart();
11 (void)__ttest();
12 __tcommit();
13 __tcancel(0x789a);
14 __tcancel(f() + A);
16 #else
17 void test_tme_funcs() {
18 __builtin_arm_tstart();
19 (void)__builtin_arm_ttest();
20 __builtin_arm_tcommit();
21 __builtin_arm_tcancel(0x789a);
22 __builtin_arm_tcancel(f() + A);
24 #endif
25 // CHECK: call i64 @llvm.aarch64.tstart()
26 // CHECK: call i64 @llvm.aarch64.ttest()
27 // CHECK: call void @llvm.aarch64.tcommit()
28 // CHECK: call void @llvm.aarch64.tcancel(i64 30874)
29 // CHECK: call void @llvm.aarch64.tcancel(i64 65535)
31 // CHECK: declare i64 @llvm.aarch64.tstart() #1
32 // CHECK: declare i64 @llvm.aarch64.ttest() #1
33 // CHECK: declare void @llvm.aarch64.tcommit() #1
34 // CHECK: declare void @llvm.aarch64.tcancel(i64 immarg) #1
36 #ifdef __ARM_FEATURE_TME
37 extern "C" void arm_feature_tme_defined() {}
38 #endif
39 // CHECK: define{{.*}} void @arm_feature_tme_defined()
41 // CHECK: attributes #1 = { nounwind willreturn }