Commit 9c2c4e62 by Tom de Vries Committed by Tom de Vries

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
parent c6abdc36
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> 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
PR C++/60209 - Declaration of user-defined literal operator cause error PR C++/60209 - Declaration of user-defined literal operator cause error
......
/* { 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;
}
/* { 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 } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment