Files
clang-p2996/compiler-rt/test/builtins/Unit/cpu_model_test.c
Fangrui Song 70f9cfc857 [builtins][test] Delete unneeded file headers
We don't add file headers to tests. The comments are useless as well -
their purpose can be easily inferred from the filenames.
2020-06-16 17:46:22 -07:00

20 lines
401 B
C

// REQUIRES: x86-target-arch
// RUN: %clang_builtins %s %librt -o %t && %run %t
// REQUIRES: librt_has_cpu_model
// FIXME: XFAIL the test because it is expected to return non-zero value.
// XFAIL: *
#include <stdio.h>
int main (void) {
#if defined(i386) || defined(__x86_64__)
if(__builtin_cpu_supports("avx2"))
return 4;
else
return 3;
#else
printf("skipped\n");
return 0;
#endif
}