Message ID | CAOvf_xym6ajUDA2caCCtKr1=vVzOYZwaiV-0UO=Xyxhti2bDYg@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Wed, Oct 22, 2014 at 07:55:57PM +0400, Evgeny Stupachenko wrote: > There is a test for Linux x86 that also fails without the changes in the patch: > > ChangeLog: > > 2014-10-22 Evgeny Stupachenko <evstupac@gmail.com> > > PR rtl-optimization/63618 > * gcc.target/i386/pr63618.c: New. > > diff --git a/gcc/testsuite/gcc.target/i386/pr63618.c > b/gcc/testsuite/gcc.target/i386/pr63618.c > new file mode 100644 > index 0000000..cf10a2b > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr63618.c > @@ -0,0 +1,34 @@ > +/* PR rtl-optimization/63618 */ > +/* { dg-do run } */ > +/* { dg-require-effective-target sse4 } */ > +/* { dg-require-effective-target ia32 } */ > +/* { dg-options "-O2 -msse4.2 -mtune=corei7 -fno-inline -fPIC" } */ What is ia32 specific on the test? As for -msse4.2 and sse4 effective target, I'd say better would be to stick that to /* { dg-additional-options "-msse4.2" { target sse4 } } */ Similarly, you want -fPIC only if { target fpic }, thus I'd say you want to start the test with: /* { dg-do run } */ /* { dg-options "-O2 -mtune=corei7 -fno-inline" } */ /* { dg-additional-options "-msse4.2" { target sse4 } } */ /* { dg-additional-options "-fpic" { target fpic } } */ Jakub
diff --git a/gcc/testsuite/gcc.target/i386/pr63618.c b/gcc/testsuite/gcc.target/i386/pr63618.c new file mode 100644 index 0000000..cf10a2b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr63618.c @@ -0,0 +1,34 @@ +/* PR rtl-optimization/63618 */ +/* { dg-do run } */ +/* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target ia32 } */ +/* { dg-options "-O2 -msse4.2 -mtune=corei7 -fno-inline -fPIC" } */ + +static const __float128 cf = 0.1E+10Q; + +__float128 +f128_square(__float128 x) +{ + return x * x; +} + +__float128 +f128_p3(__float128 x) +{ + return x * x * x; +} + +__float128 +cond_f128_square (__float128 x, int p) +{ + x = f128_p3 (x); + if (p) + x = f128_square(cf); + return x; +} + +int main() +{ + __float128 x = cond_f128_square (cf, 1); + return (int)(x < cf); +}