[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / X86 / ptwrite.c
bloba34ed741b5ff25b948bfe42cb44d8f524cc2c076
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
4 #include <immintrin.h>
6 #include <stdint.h>
8 void test_ptwrite32(uint32_t value) {
9 //X86-LABEL: @test_ptwrite32
10 //X86: call void @llvm.x86.ptwrite32(i32 %{{.*}})
11 _ptwrite32(value);
14 #ifdef __x86_64__
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);
22 #endif /* __x86_64__ */