xref: /llvm-project/clang/test/CodeGen/X86/rtm-builtins.c (revision 2239882f7d0e4e6d5702bc20ba071a92ec75d37c)
1 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +rtm -emit-llvm -o - | FileCheck %s
2 
3 
4 #include <immintrin.h>
5 
test_xbegin(void)6 unsigned int test_xbegin(void) {
7   // CHECK: i32 @llvm.x86.xbegin()
8   return _xbegin();
9 }
10 
11 void
test_xend(void)12 test_xend(void) {
13   // CHECK: void @llvm.x86.xend()
14   _xend();
15 }
16 
17 void
test_xabort(void)18 test_xabort(void) {
19   // CHECK: void @llvm.x86.xabort(i8 2)
20   _xabort(2);
21 }
22 
test_xtest(void)23 unsigned int test_xtest(void) {
24   // CHECK: i32 @llvm.x86.xtest()
25   return _xtest();
26 }
27