mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 03:46:07 +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
27 lines
474 B
C
27 lines
474 B
C
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +rtm -emit-llvm -o - | FileCheck %s
|
|
|
|
|
|
#include <immintrin.h>
|
|
|
|
unsigned int test_xbegin(void) {
|
|
// CHECK: i32 @llvm.x86.xbegin()
|
|
return _xbegin();
|
|
}
|
|
|
|
void
|
|
test_xend(void) {
|
|
// CHECK: void @llvm.x86.xend()
|
|
_xend();
|
|
}
|
|
|
|
void
|
|
test_xabort(void) {
|
|
// CHECK: void @llvm.x86.xabort(i8 2)
|
|
_xabort(2);
|
|
}
|
|
|
|
unsigned int test_xtest(void) {
|
|
// CHECK: i32 @llvm.x86.xtest()
|
|
return _xtest();
|
|
}
|