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
[]) {
10 for (i
= 0; i
< n
; ++i
)
14 void __attribute__ ((target("fpu=vfp")))
15 f3(int n
, int x
[], int y
[]) {
17 for (i
= 0; i
< n
; ++i
)
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 } } */