Message ID | 20131018100316.B1F60106@mailhost.lps.ens.fr |
---|---|
State | New |
Headers | show |
On Fri, Oct 18, 2013 at 3:03 AM, Dominique Dhumieres <dominiq@lps.ens.fr> wrote: > Sriraman, > > The tests gcc.target/i386/funcspec-5.c and gcc.target/i386/pr57756.c fail > on targets for which -msse is the default (see > http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01365.html or > http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01345.html ). pr57756.c is reported failing on x86_64-unknown-linux-gnu and I am using the same config. I have both tests passing. What am I missing? I do not see why pr57756 should be marked with -mno-sse. Sri > > This is fixed with the following patch: > > diff -up ../_clean/gcc/testsuite/gcc.target/i386/funcspec-5.c gcc/testsuite/gcc.target/i386/funcspec-5.c > --- ../_clean/gcc/testsuite/gcc.target/i386/funcspec-5.c 2011-08-23 21:54:27.000000000 +0200 > +++ gcc/testsuite/gcc.target/i386/funcspec-5.c 2013-10-17 09:45:20.000000000 +0200 > @@ -2,6 +2,7 @@ > without error. */ > /* { dg-do compile } */ > /* { dg-require-effective-target ia32 } */ > +/* { dg-options "-mno-sse" } */ > > extern void test_abm (void) __attribute__((__target__("abm"))); > extern void test_aes (void) __attribute__((__target__("aes"))); > diff -up ../_clean/gcc/testsuite/gcc.target/i386/pr57756.c gcc/testsuite/gcc.target/i386/pr57756.c > --- ../_clean/gcc/testsuite/gcc.target/i386/pr57756.c 2013-10-15 23:53:31.000000000 +0200 > +++ gcc/testsuite/gcc.target/i386/pr57756.c 2013-10-17 09:46:53.000000000 +0200 > @@ -1,6 +1,7 @@ > /* callee cannot be inlined into caller because it has a higher > target ISA. */ > /* { dg-do compile } */ > +/* { dg-options "-mno-sse" } */ > > __attribute__((always_inline,target("sse4.2"))) > __inline int callee () /* { dg-error "inlining failed in call to always_inline" } */ > > My apologies if this has already reported in the thread (I may have missed some posts). > > Dominique
On Fri, Oct 18, 2013 at 10:27 AM, Sriraman Tallam <tmsriram@google.com> wrote: > On Fri, Oct 18, 2013 at 3:03 AM, Dominique Dhumieres <dominiq@lps.ens.fr> wrote: >> Sriraman, >> >> The tests gcc.target/i386/funcspec-5.c and gcc.target/i386/pr57756.c fail >> on targets for which -msse is the default (see >> http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01365.html or >> http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01345.html ). > > pr57756.c is reported failing on x86_64-unknown-linux-gnu and I am > using the same config. I have both tests passing. What am I missing? I > do not see why pr57756 should be marked with -mno-sse. I see why pr57756.c could fail, if -msse4.2 is turned on by default. I think this test needs {dg-options "-mno-sse4.2"}. With SSE4.2 by default, the target attributes are no-ops and the inlining will succeed causing the test to fail. Thanks Sri > > Sri > > >> >> This is fixed with the following patch: >> >> diff -up ../_clean/gcc/testsuite/gcc.target/i386/funcspec-5.c gcc/testsuite/gcc.target/i386/funcspec-5.c >> --- ../_clean/gcc/testsuite/gcc.target/i386/funcspec-5.c 2011-08-23 21:54:27.000000000 +0200 >> +++ gcc/testsuite/gcc.target/i386/funcspec-5.c 2013-10-17 09:45:20.000000000 +0200 >> @@ -2,6 +2,7 @@ >> without error. */ >> /* { dg-do compile } */ >> /* { dg-require-effective-target ia32 } */ >> +/* { dg-options "-mno-sse" } */ >> >> extern void test_abm (void) __attribute__((__target__("abm"))); >> extern void test_aes (void) __attribute__((__target__("aes"))); >> diff -up ../_clean/gcc/testsuite/gcc.target/i386/pr57756.c gcc/testsuite/gcc.target/i386/pr57756.c >> --- ../_clean/gcc/testsuite/gcc.target/i386/pr57756.c 2013-10-15 23:53:31.000000000 +0200 >> +++ gcc/testsuite/gcc.target/i386/pr57756.c 2013-10-17 09:46:53.000000000 +0200 >> @@ -1,6 +1,7 @@ >> /* callee cannot be inlined into caller because it has a higher >> target ISA. */ >> /* { dg-do compile } */ >> +/* { dg-options "-mno-sse" } */ >> >> __attribute__((always_inline,target("sse4.2"))) >> __inline int callee () /* { dg-error "inlining failed in call to always_inline" } */ >> >> My apologies if this has already reported in the thread (I may have missed some posts). >> >> Dominique
> I see why pr57756.c could fail, if -msse4.2 is turned on by default. I > think this test needs {dg-options "-mno-sse4.2"}. This change allows the test to pass. The failure of gcc.target/i386/funcspec-5.c is /opt/gcc/work/gcc/testsuite/gcc.target/i386/funcspec-5.c:34:1: warning: SSE instruction set disabled, using 387 arithmetics [enabled by default] extern void test_no_sse (void) __attribute__((__target__("no-sse"))); This extra warning is silenced by dg-options "-mno-sse", but not by "-mno-sse4.2". Dominique
diff -up ../_clean/gcc/testsuite/gcc.target/i386/funcspec-5.c gcc/testsuite/gcc.target/i386/funcspec-5.c --- ../_clean/gcc/testsuite/gcc.target/i386/funcspec-5.c 2011-08-23 21:54:27.000000000 +0200 +++ gcc/testsuite/gcc.target/i386/funcspec-5.c 2013-10-17 09:45:20.000000000 +0200 @@ -2,6 +2,7 @@ without error. */ /* { dg-do compile } */ /* { dg-require-effective-target ia32 } */ +/* { dg-options "-mno-sse" } */ extern void test_abm (void) __attribute__((__target__("abm"))); extern void test_aes (void) __attribute__((__target__("aes"))); diff -up ../_clean/gcc/testsuite/gcc.target/i386/pr57756.c gcc/testsuite/gcc.target/i386/pr57756.c --- ../_clean/gcc/testsuite/gcc.target/i386/pr57756.c 2013-10-15 23:53:31.000000000 +0200 +++ gcc/testsuite/gcc.target/i386/pr57756.c 2013-10-17 09:46:53.000000000 +0200 @@ -1,6 +1,7 @@ /* callee cannot be inlined into caller because it has a higher target ISA. */ /* { dg-do compile } */ +/* { dg-options "-mno-sse" } */ __attribute__((always_inline,target("sse4.2"))) __inline int callee () /* { dg-error "inlining failed in call to always_inline" } */