1 | // REQUIRES: aarch64-target-arch |
---|---|
2 | // REQUIRES: native-run |
3 | // RUN: %clang_builtins %s %librt -o %t && %run %t |
4 | // REQUIRES: librt_has_aarch64 |
5 | int main(void) { |
6 | if (__builtin_cpu_supports("fp+simd+pmull+sha2+crc")) { |
7 | if (__builtin_cpu_supports("fp") && __builtin_cpu_supports( "simd") && |
8 | __builtin_cpu_supports("pmull") && __builtin_cpu_supports( "sha2") && |
9 | __builtin_cpu_supports("crc")) { |
10 | return 0; |
11 | } else { |
12 | // Something wrong in feature detection |
13 | return 1; |
14 | } |
15 | } |
16 | return 0; |
17 | } |
18 |