This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][i386]Fix PR 57756


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]