| 1 |
// 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 <immintrin.h> |
| 5 |
|
| 6 |
#include <stdint.h> |
| 7 |
|
| 8 |
void 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 |
|
| 16 |
void 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__ */ |