blob: 5660d8e241430107145e0e02a42c871184afbee0 [file] [log] [blame]
Michael Liao463eb892012-11-10 05:17:46 +00001// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +rtm -emit-llvm -o - | FileCheck %s
2
3// Don't include mm_malloc.h, it's system specific.
4#define __MM_MALLOC_H
5
6#include <immintrin.h>
7
8unsigned int test_xbegin(void) {
9 // CHECK: i32 @llvm.x86.xbegin()
10 return _xbegin();
11}
12
13void
14test_xend(void) {
15 // CHECK: void @llvm.x86.xend()
16 _xend();
17}
18
19void
20test_xabort(void) {
21 // CHECK: void @llvm.x86.xabort(i8 2)
22 _xabort(2);
23}
Michael Liaof91210d2013-03-29 05:14:06 +000024
25unsigned int test_xtest(void) {
26 // CHECK: i32 @llvm.x86.xtest()
27 return _xtest();
28}