blob: b20b15a39746e5715cdce1139577884d2575e760 [file] [log] [blame]
Gabor Buella3a757122018-05-10 07:28:54 +00001// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +ptwrite -emit-llvm -o - -Wall -Werror -pedantic | FileCheck %s --check-prefix=X86 --check-prefix=X86_64
2// RUN: %clang_cc1 %s -ffreestanding -triple=i386-unknown-unknown -target-feature +ptwrite -emit-llvm -o - -Wall -Werror -pedantic | FileCheck %s --check-prefix=X86
3
4#include <x86intrin.h>
5
6#include <stdint.h>
7
8void test_ptwrite32(uint32_t value) {
9 //X86-LABEL: @test_ptwrite32
10 //X86: call void @llvm.x86.ptwrite32(i32 %{{.*}})
11 _ptwrite32(value);
12}
13
14#ifdef __x86_64__
15
16void test_ptwrite64(uint64_t value) {
17 //X86_64-LABEL: @test_ptwrite64
18 //X86_64: call void @llvm.x86.ptwrite64(i64 %{{.*}})
19 _ptwrite64(value);
20}
21
22#endif /* __x86_64__ */