mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 14:28:54 -04:00

The X86 clang/test/CodeGen/*builtins.c tests define the mm_malloc.h include guard as a hack for avoiding its inclusion (mm_malloc.h requires a hosted environment since it expects stdlib.h to be available - which is not the case in these internal clang codegen tests). This patch removes this hack and instead passes -ffreestanding to clang cc1. Differential Revision: https://reviews.llvm.org/D24825 llvm-svn: 282581
17 lines
491 B
C
17 lines
491 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({{.*}}, 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({{.*}}, i32 1, i32 3, i32 1)
|
|
}
|