Summary: This is useful for targets which have prefetch instructions for non-default address spaces. <rdar://problem/42662136> Subscribers: nemanjai, javed.absar, hiraditya, kbarton, jkorous, dexonsmith, cfe-commits, llvm-commits, RKSimon, hfinkel, t.p.northover, craig.topper, anemet Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65254 llvm-svn: 367032
17 lines
509 B
C
17 lines
509 B
C
// RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -target-feature +prfchw -emit-llvm -o - %s | FileCheck %s
|
|
|
|
|
|
#include <x86intrin.h>
|
|
|
|
void test_m_prefetch(void *p) {
|
|
return _m_prefetch(p);
|
|
// CHECK-LABEL: define void @test_m_prefetch
|
|
// CHECK: call void @llvm.prefetch.p0i8({{.*}}, i32 0, i32 3, i32 1)
|
|
}
|
|
|
|
void test_m_prefetch_w(void *p) {
|
|
return _m_prefetchw(p);
|
|
// CHECK-LABEL: define void @test_m_prefetch_w
|
|
// CHECK: call void @llvm.prefetch.p0i8({{.*}}, i32 1, i32 3, i32 1)
|
|
}
|