PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / arm / attr-neon2.c
blob29668256cf5bd64a7fbc36e24de6e44661fce14d
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_neon_ok } */
3 /* { dg-require-effective-target arm_fp_ok } */
4 /* { dg-options "-O2" } */
5 /* { dg-add-options arm_fp } */
7 /* Reset fpu to a value compatible with the next pragmas. */
8 #pragma GCC target ("fpu=vfp")
9 #pragma GCC push_options
11 #pragma GCC target ("fpu=neon")
12 #include <arm_neon.h>
14 /* Check that pragma target is used. */
15 int8x8_t
16 my (int8x8_t __a, int8x8_t __b)
18 return __a + __b;
21 #pragma GCC pop_options
23 /* Check that command line option is restored. */
24 int8x8_t
25 my1 (int8x8_t __a, int8x8_t __b)
27 return __a + __b;
30 /* { dg-final { scan-assembler-times "\.fpu vfp" 1 } } */
31 /* { dg-final { scan-assembler-times "\.fpu neon" 1 } } */
32 /* { dg-final { scan-assembler "vadd" } } */