mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 18:46:06 +00: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
407 B
C
17 lines
407 B
C
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +pku -emit-llvm -o - -Wall -Werror | FileCheck %s
|
|
|
|
|
|
#include <immintrin.h>
|
|
|
|
unsigned int test_rdpkru_u32() {
|
|
// CHECK-LABEL: @test_rdpkru_u32
|
|
// CHECK: @llvm.x86.rdpkru
|
|
return _rdpkru_u32();
|
|
}
|
|
void test_wrpkru(unsigned int __A) {
|
|
// CHECK-LABEL: @test_wrpkru
|
|
// CHECK: @llvm.x86.wrpkru
|
|
_wrpkru(__A);
|
|
return ;
|
|
}
|