Add xmm-register version of fuse-caller-save testcase
2014-07-13 Tom de Vries <tom@codesourcery.com> * gcc.target/i386/fuse-caller-save-xmm-run.c: New test. * gcc.target/i386/fuse-caller-save-xmm.c: New test. From-SVN: r212495
This commit is contained in:
parent
c6abdc366a
commit
9c2c4e622c
@ -1,3 +1,8 @@
|
||||
2014-07-13 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* gcc.target/i386/fuse-caller-save-xmm-run.c: New test.
|
||||
* gcc.target/i386/fuse-caller-save-xmm.c: New test.
|
||||
|
||||
2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
|
||||
|
||||
PR C++/60209 - Declaration of user-defined literal operator cause error
|
||||
|
32
gcc/testsuite/gcc.target/i386/fuse-caller-save-xmm-run.c
Normal file
32
gcc/testsuite/gcc.target/i386/fuse-caller-save-xmm-run.c
Normal file
@ -0,0 +1,32 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -msse -fuse-caller-save" } */
|
||||
|
||||
typedef double v2df __attribute__((vector_size (16)));
|
||||
|
||||
static v2df __attribute__((noinline))
|
||||
bar (v2df a)
|
||||
{
|
||||
return a + (v2df){ 3.0, 3.0 };
|
||||
}
|
||||
|
||||
v2df __attribute__((noinline))
|
||||
foo (v2df y)
|
||||
{
|
||||
return y + bar (y);
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
int success;
|
||||
union {
|
||||
v2df v;
|
||||
double d[2];
|
||||
} u;
|
||||
|
||||
u.v = foo ((v2df){ 5.0, 5.0});
|
||||
success = (u.d[0] == 13.0
|
||||
&& u.d[1] == 13.0);
|
||||
|
||||
return !success;
|
||||
}
|
37
gcc/testsuite/gcc.target/i386/fuse-caller-save-xmm.c
Normal file
37
gcc/testsuite/gcc.target/i386/fuse-caller-save-xmm.c
Normal file
@ -0,0 +1,37 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -msse -fuse-caller-save" } */
|
||||
|
||||
typedef double v2df __attribute__((vector_size (16)));
|
||||
|
||||
static v2df __attribute__((noinline))
|
||||
bar (v2df a)
|
||||
{
|
||||
return a + (v2df){ 3.0, 3.0 };
|
||||
}
|
||||
|
||||
v2df __attribute__((noinline))
|
||||
foo (v2df y)
|
||||
{
|
||||
return y + bar (y);
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
int success;
|
||||
union {
|
||||
v2df v;
|
||||
double d[2];
|
||||
} u;
|
||||
|
||||
u.v = foo ((v2df){ 5.0, 5.0});
|
||||
success = (u.d[0] == 13.0
|
||||
&& u.d[1] == 13.0);
|
||||
|
||||
return !success;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-not "movaps\t%xmm1, \\(%rsp\\)" } } */
|
||||
/* { dg-final { scan-assembler-not "movapd\t\\(%rsp\\), %xmm1" } } */
|
||||
/* { dg-final { scan-assembler-times ".cfi_def_cfa_offset 16" 1 } } */
|
||||
/* { dg-final { scan-assembler-times ".cfi_def_cfa_offset 32" 1 } } */
|
Loading…
Reference in New Issue
Block a user