]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute-3.c
[AArch64]: Do not allow SIMD clones with simdlen 1 [PR113552]
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / aarch64 / simd_pcs_attribute-3.c
1 /* { dg-do compile } */
2 /* { dg-options "-Ofast" } */
3
4 __attribute__ ((__simd__))
5 __attribute__ ((__nothrow__ , __leaf__ , __const__))
6 double foo (double x);
7
8 void bar(double *f, int n)
9 {
10 int i;
11 for (i = 0; i < n; i++)
12 f[i] = foo(f[i]);
13 }
14
15 double foo(double x)
16 {
17 return x * x / 3.0;
18 }
19
20 /* { dg-final { scan-assembler-not {\.variant_pcs\tfoo} } } */
21 /* { dg-final { scan-assembler-not {\.variant_pcs\t_ZGVnM1v_foo} } } */
22 /* { dg-final { scan-assembler-times {\.variant_pcs\t_ZGVnM2v_foo} 1 } } */
23 /* { dg-final { scan-assembler-not {\.variant_pcs\t_ZGVnN1v_foo} } } */
24 /* { dg-final { scan-assembler-times {\.variant_pcs\t_ZGVnN2v_foo} 1 } } */