1 //===-- cpu_model_test.c - Test __builtin_cpu_supports -------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file tests __builtin_cpu_supports for the compiler_rt library.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 // REQUIRES: x86-target-arch
15 
16 int main (void) {
17   if(__builtin_cpu_supports("avx2"))
18     return 4;
19   else
20     return 3;
21 }
22