vect-74.c: Avoid floating point precision error in comparison.

* gcc.dg/vect/vect-74.c: Avoid floating point precision error
        in comparison.
        * gcc.dg/vect/vect-79.c: Likewise.
        * gcc.dg/vect/vect-80.c: Likewise.

From-SVN: r87762
This commit is contained in:
Dorit Naishlos 2004-09-20 16:26:24 +00:00 committed by Dorit Nuzman
parent d6fd4b8d11
commit 1cdcb2cfd1
4 changed files with 19 additions and 13 deletions

View File

@ -1,3 +1,10 @@
2004-09-20 Dorit Naishlos <dorit@il.ibm.com>
* gcc.dg/vect/vect-74.c: Avoid floating point precision error
in comparison.
* gcc.dg/vect/vect-79.c: Likewise.
* gcc.dg/vect/vect-80.c: Likewise.
2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15750

View File

@ -11,8 +11,8 @@
typedef float afloat __attribute__ ((__aligned__(16)));
afloat a[N];
afloat b[N+4] = {0.2, 1.3, 2.3, 3.4, 4.5, 5.6, 7.8, 9.0, 10.11, 11.12, 12.13, 13.14, 14.15, 15.16, 16.17, 17.18, 18.19, 19.20};
afloat c[N] = {0.2, 1.3, 2.3, 3.4, 4.5, 5.6, 7.8, 9.0, 10.11, 11.12, 12.13, 13.14, 14.15, 15.16};
afloat b[N+4] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0};
afloat c[N] = {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5};
int
main1 (afloat *__restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)

View File

@ -11,12 +11,12 @@
typedef float afloat __attribute__ ((__aligned__(16)));
afloat a[N];
afloat b[N+4] = {0.2, 1.3, 2.3, 3.4, 4.5, 5.6, 7.8, 9.0, 10.11, 11.12, 12.13, 13.14, 14.15, 15.16, 16.17, 17.18, 18.19, 19.20};
afloat c[N] = {0.2, 1.3, 2.3, 3.4, 4.5, 5.6, 7.8, 9.0, 10.11, 11.12, 12.13, 13.14, 14.15, 15.16};
afloat b[N+4] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0};
afloat c[N] = {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5};
/* Not vectorizable. Alias. */
int
main2 (afloat *pa, afloat *pb, afloat *pc)
main1 (afloat *pa, afloat *pb, afloat *pc)
{
int i;
afloat *q = pb + 4;
@ -40,7 +40,7 @@ int main (void)
{
check_vect ();
main2 (a, b, c);
main1 (a, b, c);
return 0;
}

View File

@ -10,17 +10,16 @@
typedef float afloat __attribute__ ((__aligned__(16)));
float fa[N];
float fb[N+4] = {0.2, 1.3, 2.3, 3.4, 4.5, 5.6, 7.8, 9.0, 10.11, 11.12, 12.13, 13.14, 14.15, 15.16,
16.17, 17.18, 18.19, 19.20};
float fc[N] = {0.2, 1.3, 2.3, 3.4, 4.5, 5.6, 7.8, 9.0, 10.11, 11.12, 12.13, 13.14, 14.15, 15.16};
afloat fa[N];
afloat fb[N+4] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0};
afloat fc[N] = {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5};
/* Not vectorizable: not aligned pointers. */
int
main3 (float * __restrict__ pa, float * __restrict__ pb, float *__restrict__ pc)
main1 (float * __restrict__ pa, float * __restrict__ pb, float *__restrict__ pc)
{
int i;
afloat *q = pb + 4;
float *q = pb + 4;
for (i = 0; i < N; i++)
{
@ -41,7 +40,7 @@ int main (void)
{
check_vect ();
main3 (fa, fb, fc);
main1 (fa, fb, fc);
return 0;
}