2016-09-28 19:59:09 +08:00
|
|
|
// RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -target-feature +prfchw -emit-llvm -o - %s | FileCheck %s
|
2013-03-27 01:52:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
#include <x86intrin.h>
|
|
|
|
|
2015-07-28 03:01:52 +08:00
|
|
|
void test_m_prefetch(void *p) {
|
|
|
|
return _m_prefetch(p);
|
2015-07-28 03:49:54 +08:00
|
|
|
// CHECK-LABEL: define void @test_m_prefetch
|
|
|
|
// CHECK: call void @llvm.prefetch({{.*}}, i32 0, i32 3, i32 1)
|
2015-07-28 03:01:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void test_m_prefetch_w(void *p) {
|
2013-03-27 01:52:08 +08:00
|
|
|
return _m_prefetchw(p);
|
2015-07-28 03:49:54 +08:00
|
|
|
// CHECK-LABEL: define void @test_m_prefetch_w
|
2013-03-27 01:52:08 +08:00
|
|
|
// CHECK: call void @llvm.prefetch({{.*}}, i32 1, i32 3, i32 1)
|
|
|
|
}
|