minix/external/bsd/llvm/dist/clang/test/CodeGen/rtm-builtins.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

28 lines
537 B
C

// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +rtm -emit-llvm -o - | FileCheck %s
// Don't include mm_malloc.h, it's system specific.
#define __MM_MALLOC_H
#include <immintrin.h>
unsigned int test_xbegin(void) {
// CHECK: i32 @llvm.x86.xbegin()
return _xbegin();
}
void
test_xend(void) {
// CHECK: void @llvm.x86.xend()
_xend();
}
void
test_xabort(void) {
// CHECK: void @llvm.x86.xabort(i8 2)
_xabort(2);
}
unsigned int test_xtest(void) {
// CHECK: i32 @llvm.x86.xtest()
return _xtest();
}