diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/CodeGen/rtm-builtins.c | |
parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) | |
download | src-test2-13cc256e404620c1de0cbcc4e43ce1e2dbbc4898.tar.gz src-test2-13cc256e404620c1de0cbcc4e43ce1e2dbbc4898.zip |
Notes
Diffstat (limited to 'test/CodeGen/rtm-builtins.c')
-rw-r--r-- | test/CodeGen/rtm-builtins.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/rtm-builtins.c b/test/CodeGen/rtm-builtins.c new file mode 100644 index 000000000000..c4939a9a3d9f --- /dev/null +++ b/test/CodeGen/rtm-builtins.c @@ -0,0 +1,23 @@ +// 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); +} |