simd_pcs_attribute.c: New test.

2019-08-02  Steve Ellcey  <sellcey@marvell.com>

	* gcc.target/aarch64/simd_pcs_attribute.c: New test.
	* gcc.target/aarch64/simd_pcs_attribute-2.c: Ditto.
	* gcc.target/aarch64/simd_pcs_attribute-3.c: Ditto.

From-SVN: r274020
This commit is contained in:
Steve Ellcey 2019-08-02 16:04:14 +00:00 committed by Steve Ellcey
parent e8a70c177c
commit 89eed80146
4 changed files with 62 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2019-08-02 Steve Ellcey <sellcey@marvell.com>
* gcc.target/aarch64/simd_pcs_attribute.c: New test.
* gcc.target/aarch64/simd_pcs_attribute-2.c: Ditto.
* gcc.target/aarch64/simd_pcs_attribute-3.c: Ditto.
2019-08-02 Uroš Bizjak <ubizjak@gmail.com>
PR target/91201

View File

@ -0,0 +1,16 @@
/* { dg-do compile } */
/* { dg-options "-Ofast" } */
__attribute__ ((__simd__ ("notinbranch")))
__attribute__ ((__nothrow__ , __leaf__ , __const__))
extern double foo (double x);
void bar(double * f, int n)
{
int i;
for (i = 0; i < n; i++)
f[i] = foo(f[i]);
}
/* { dg-final { scan-assembler-not {\.variant_pcs\tfoo} } } */
/* { dg-final { scan-assembler-times {\.variant_pcs\t_ZGVnN2v_foo} 1 } } */

View File

@ -0,0 +1,24 @@
/* { dg-do compile } */
/* { dg-options "-Ofast" } */
__attribute__ ((__simd__))
__attribute__ ((__nothrow__ , __leaf__ , __const__))
double foo (double x);
void bar(double *f, int n)
{
int i;
for (i = 0; i < n; i++)
f[i] = foo(f[i]);
}
double foo(double x)
{
return x * x / 3.0;
}
/* { dg-final { scan-assembler-not {\.variant_pcs\tfoo} } } */
/* { dg-final { scan-assembler-times {\.variant_pcs\t_ZGVnM1v_foo} 1 } } */
/* { dg-final { scan-assembler-times {\.variant_pcs\t_ZGVnM2v_foo} 1 } } */
/* { dg-final { scan-assembler-times {\.variant_pcs\t_ZGVnN1v_foo} 1 } } */
/* { dg-final { scan-assembler-times {\.variant_pcs\t_ZGVnN2v_foo} 1 } } */

View File

@ -0,0 +1,16 @@
/* { dg-do compile } */
/* { dg-options "-Ofast" } */
__attribute__ ((__simd__ ("notinbranch")))
__attribute__ ((__nothrow__ , __leaf__ , __const__))
extern double log (double __x);
void foo(double *f, int n)
{
int i;
for (i = 0; i < n; i++)
f[i] = log(f[i]);
}
/* { dg-final { scan-assembler-not {\.variant_pcs\tlog} } } */
/* { dg-final { scan-assembler-times {\.variant_pcs\t_ZGVnN2v_log} 1 } } */