Commit 0d16f462 by H.J. Lu Committed by H.J. Lu

Add more 256bit AVX testcases.

2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>

	* gcc.target/i386/recip-vec-sqrtf-avx.c: New.
	* gcc.target/i386/recip-vec-divf-avx.c: Likewise.
	* gcc.target/i386/vectorize4-avx.c: Likewise.

From-SVN: r165449
parent 7f82d2ae
2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/recip-vec-sqrtf-avx.c: New.
* gcc.target/i386/recip-vec-divf-avx.c: Likewise.
* gcc.target/i386/vectorize4-avx.c: Likewise.
2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/avx-copysign-vec.c: New.
* gcc.target/i386/avx-copysignf-vec.c: Likewise.
......
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mfpmath=sse -mrecip" } */
float a[16];
float b[16];
float r[16];
void t1(void)
{
int i;
for (i = 0; i < 16; i++)
r[i] = a[i] / b[i];
}
/* { dg-final { scan-assembler "vrcpps" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mfpmath=sse -mrecip" } */
float a[16];
float b[16];
float r[16];
extern float sqrtf (float);
void t1(void)
{
int i;
for (i = 0; i < 16; i++)
r[i] = a[i] / sqrtf (b[i]);
}
void t2(void)
{
int i;
for (i = 0; i < 16; i++)
r[i] = sqrtf (a[i] / b[i]);
}
void t3(void)
{
int i;
for (i = 0; i < 16; i++)
r[i] = sqrtf (a[i]);
}
/* { dg-final { scan-assembler-times "vrsqrtps" 3 } } */
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
extern double sqrt (double __x);
calc_freq (int *dest)
{
float tmp_out[257];
int i;
for (i = 0; i < 256; i++)
dest[i] = sqrt (tmp_out[i]);
}
/* { dg-final { scan-assembler "vsqrtpd" } } */
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