xref: /llvm-project/compiler-rt/test/builtins/Unit/cpu_model_test.c (revision 568babab7e769a7793c28aee4f889898bf0bd8ba)
1 // REQUIRES: x86-target-arch
2 // RUN: %clang_builtins %s %librt -o %t && %run %t
3 // REQUIRES: librt_has_x86
4 
5 // FIXME: XFAIL the test because it is expected to return non-zero value.
6 // XFAIL: *
7 #include <stdio.h>
8 
main(void)9 int main (void) {
10 #if defined(i386) || defined(__x86_64__)
11   if(__builtin_cpu_supports("avx2"))
12     return 4;
13   else
14     return 3;
15 #else
16   printf("skipped\n");
17   return 0;
18 #endif
19 }
20