1 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +lwp -emit-llvm -o - -Wall -Werror | FileCheck %s
5 void test_llwpcb(void *ptr
) {
6 // CHECK-LABEL: @test_llwpcb
7 // CHECK: call void @llvm.x86.llwpcb(ptr %{{.*}})
11 void* test_slwpcb(void) {
12 // CHECK-LABEL: @test_slwpcb
13 // CHECK: call ptr @llvm.x86.slwpcb()
17 unsigned char test_lwpins32(unsigned val2
, unsigned val1
) {
18 // CHECK-LABEL: @test_lwpins32
19 // CHECK: call i8 @llvm.x86.lwpins32(i32
20 return __lwpins32(val2
, val1
, 0x01234);
23 unsigned char test_lwpins64(unsigned long long val2
, unsigned val1
) {
24 // CHECK-LABEL: @test_lwpins64
25 // CHECK: call i8 @llvm.x86.lwpins64(i64
26 return __lwpins64(val2
, val1
, 0x56789);
29 void test_lwpval32(unsigned val2
, unsigned val1
) {
30 // CHECK-LABEL: @test_lwpval32
31 // CHECK: call void @llvm.x86.lwpval32(i32
32 __lwpval32(val2
, val1
, 0x01234);
35 void test_lwpval64(unsigned long long val2
, unsigned val1
) {
36 // CHECK-LABEL: @test_lwpval64
37 // CHECK: call void @llvm.x86.lwpval64(i64
38 __lwpval64(val2
, val1
, 0xABCDEF);