Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/pr118828.c

raw
1 /* { dg-do preprocess } */
2 /* { dg-options "-mno-lasx" } */
3
4 #ifdef __loongarch_asx
5 #error LASX should not be available here
6 #endif
7
8 #ifdef __loongarch_simd_width
9 #if __loongarch_simd_width == 256
10 #error simd width shuold not be 256
11 #endif
12 #endif
13
14 #pragma GCC push_options
15 #pragma GCC target("lasx")
16 #ifndef __loongarch_asx
17 #error LASX should be available here
18 #endif
19 #ifndef __loongarch_simd_width
20 #error simd width should be available here
21 #elif __loongarch_simd_width != 256
22 #error simd width should be 256
23 #endif
24 #pragma GCC pop_options
25
26 #ifdef __loongarch_asx
27 #error LASX should become unavailable again
28 #endif
29
30 #ifdef __loongarch_simd_width
31 #if __loongarch_simd_width == 256
32 #error simd width shuold not be 256 again
33 #endif
34 #endif