| 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 | |
| 6 | unsigned int test_xbegin(void) { |
| 7 | // CHECK: i32 @llvm.x86.xbegin() |
| 8 | return _xbegin(); |
| 9 | } |
| 10 | |
| 11 | void |
| 12 | test_xend(void) { |
| 13 | // CHECK: void @llvm.x86.xend() |
| 14 | _xend(); |
| 15 | } |
| 16 | |
| 17 | void |
| 18 | test_xabort(void) { |
| 19 | // CHECK: void @llvm.x86.xabort(i8 2) |
| 20 | _xabort(2); |
| 21 | } |
| 22 | |
| 23 | unsigned int test_xtest(void) { |
| 24 | // CHECK: i32 @llvm.x86.xtest() |
| 25 | return _xtest(); |
| 26 | } |
| 27 | |