Summary: test/builtins/Unit/cpu_model_test.c tests the X86 specific builtin `__builtin_cpu_supports`. It fails if the clang's default target is not X86. The proposed patch adds an additional requirement for the X86 target to the test, making lit ignore the test if the target is different. Reviewers: asbirlea Subscribers: dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D23633 llvm-svn: 279071
22 lines
648 B
C
22 lines
648 B
C
//===-- cpu_model_test.c - Test __builtin_cpu_supports -------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file tests __builtin_cpu_supports for the compiler_rt library.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// REQUIRES: x86-target-arch
|
|
|
|
int main (void) {
|
|
if(__builtin_cpu_supports("avx2"))
|
|
return 4;
|
|
else
|
|
return 3;
|
|
}
|