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:
parent
e8a70c177c
commit
89eed80146
@ -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
|
||||
|
16
gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute-2.c
Normal file
16
gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute-2.c
Normal 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 } } */
|
24
gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute-3.c
Normal file
24
gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute-3.c
Normal 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 } } */
|
16
gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute.c
Normal file
16
gcc/testsuite/gcc.target/aarch64/simd_pcs_attribute.c
Normal 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 } } */
|
Loading…
x
Reference in New Issue
Block a user