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
5 constexpr int f() { return 65536; }
9 void test_tme_funcs() {
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
);
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() {}
39 // CHECK: define{{.*}} void @arm_feature_tme_defined()
41 // CHECK: attributes #1 = { nounwind willreturn }