Commit a160b43c by David S. Miller Committed by David S. Miller

Add some sparc VIS3 move test cases.

gcc/testsuite/

	* gcc.target/sparc/vis3move-1.c: New test.
	* gcc.target/sparc/vis3move-2.c: New test.
	* gcc.target/sparc/vis3move-3.c: New test.

From-SVN: r180418
parent c04a30b4
2011-10-24 David S. Miller <davem@davemloft.net>
* gcc.target/sparc/vis3move-1.c: New test.
* gcc.target/sparc/vis3move-2.c: New test.
* gcc.target/sparc/vis3move-3.c: New test.
2011-10-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.dg/strlenopt-22.c: New testcase.
......
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O1 -mvis3" } */
double d;
float f;
int test_convert_from_float(void)
{
return f;
}
int test_convert_from_double(void)
{
return d;
}
float test_convert_to_float(int x)
{
return x;
}
double test_convert_to_double(int x)
{
return x;
}
/* { dg-final { scan-assembler-times "movstouw\t%" 2 } } */
/* { dg-final { scan-assembler-times "movwtos\t%" 2 } } */
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
/* { dg-options "-O1 -mvis3" } */
double d;
float f;
long test_convert_from_float(void)
{
return f;
}
long test_convert_from_double(void)
{
return d;
}
float test_convert_to_float(long x)
{
return x;
}
double test_convert_to_double(long x)
{
return x;
}
/* { dg-final { scan-assembler-times "movdtox\t%" 2 } } */
/* { dg-final { scan-assembler-times "movxtod\t%" 2 } } */
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O1 -mvis3" } */
float fnegs (float a)
{
return -a;
}
double fnegd (double a)
{
return -a;
}
float fmuls (float a, float b)
{
return a * b;
}
double fmuld (double a, double b)
{
return a * b;
}
double fsmuld (float a, float b)
{
return (double)a * (double)b;
}
double fnsmuld (float a, float b)
{
return -((double)a * (double)b);
}
/* { dg-final { scan-assembler-times "movwtos\t%" 13 } } */
/* { dg-final { scan-assembler "fnegs\t%" } } */
/* { dg-final { scan-assembler "fnegd\t%" } } */
/* { dg-final { scan-assembler "fmuls\t%" } } */
/* { dg-final { scan-assembler "fmuld\t%" } } */
/* { dg-final { scan-assembler "fsmuld\t%" } } */
/* { dg-final { scan-assembler "fnsmuld\t%" } } */
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