[ARM] Fix test armv8_2-fp16-move-1.c
[official-gcc.git] / gcc / testsuite / gcc.target / arm / attr-neon.c
blob225fb8dc3dba84810f807ae21bde6a0ab37c0796
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_neon_ok } */
3 /* { dg-options "-O2 -ftree-vectorize" } */
4 /* { dg-add-options arm_neon arm_v8_vfp } */ /* The arm_v8_vfp adds -mfpu=fp-armv8 to the command line, overriding any -mfpu= option set by arm_neon, thus ensuring that the attributes below really are checked for correct fpu selection. */
6 /* Verify that neon instructions are emitted once. */
7 void __attribute__ ((target("fpu=neon")))
8 f1(int n, int x[], int y[]) {
9 int i;
10 for (i = 0; i < n; ++i)
11 y[i] = x[i] << 3;
14 void __attribute__ ((target("fpu=vfp")))
15 f3(int n, int x[], int y[]) {
16 int i;
17 for (i = 0; i < n; ++i)
18 y[i] = x[i] << 3;
21 /* { dg-final { scan-assembler-times "\.fpu vfp" 1 } } */
22 /* { dg-final { scan-assembler-times "\.fpu neon" 1 } } */
23 /* { dg-final { scan-assembler-times "vshl" 1 } } */