[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / compiler-rt / test / builtins / Unit / cpu_model_test.c
blob21847f6790f6fa44ae4aedf2d7fe59fb0f518fb6
1 // FIXME: XFAIL the test because it is expected to return non-zero value.
2 // XFAIL: *
3 // REQUIRES: x86-target-arch
4 // RUN: %clang_builtins %s %librt -o %t && %run %t
5 // REQUIRES: librt_has_cpu_model
6 //===-- cpu_model_test.c - Test __builtin_cpu_supports --------------------===//
7 //
8 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
9 // See https://llvm.org/LICENSE.txt for license information.
10 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
12 //===----------------------------------------------------------------------===//
14 // This file tests __builtin_cpu_supports for the compiler_rt library.
16 //===----------------------------------------------------------------------===//
18 #include <stdio.h>
20 int main (void) {
21 #if defined(i386) || defined(__x86_64__)
22 if(__builtin_cpu_supports("avx2"))
23 return 4;
24 else
25 return 3;
26 #else
27 printf("skipped\n");
28 return 0;
29 #endif