xref: /llvm-project/clang/test/CodeGen/X86/prefetchi-builtins.c (revision 62ca79102cf9646aa9ed0dac7f018432a68eedf1)
1 // RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -target-feature +prefetchi -emit-llvm -o - %s | FileCheck %s
2 
3 
4 #include <x86intrin.h>
5 
test_m_prefetch_it0(void * p)6 void test_m_prefetch_it0(void *p) {
7   return _m_prefetchit0(p);
8   // CHECK-LABEL: define{{.*}} void @test_m_prefetch_it0
9   // CHECK: call void @llvm.prefetch.p0(ptr {{.*}}, i32 0, i32 3, i32 0)
10 }
11 
test_m_prefetch_it1(void * p)12 void test_m_prefetch_it1(void *p) {
13   return _m_prefetchit1(p);
14   // CHECK-LABEL: define{{.*}} void @test_m_prefetch_it1
15   // CHECK: call void @llvm.prefetch.p0(ptr {{.*}}, i32 0, i32 2, i32 0)
16 }
17