Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-20 Thread Uros Bizjak
Hello!

> This patch adds intrinsics for FMA instruction set along with tests for them.
> Bootstraps and passes make check (including make check on simulator
> for new runtime tests).

? ? ? ? ? ? ? * config/i386/fmaintrin.h: New.

It is not included in the patch.

? ? ? ? ? ? ? * config.gcc: Add fmaintrin.h.
? ? ? ? ? ? ? * config/i386/i386.c
? ? ? ? ? ? ? *  (IX86_BUILTIN_VFMADDSS3): New.
? ? ? ? ? ? ? (IX86_BUILTIN_VFMADDSD3): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMADDSS3): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMADDSD3): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBSS3): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBSD3): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMSUBSS3): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMSUBSD3): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBPS): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBPD): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBPS256): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBPD256): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMADDPS): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMADDPD): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMADDPS256): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMADDPD256): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMSUBPS): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMSUBPD): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMSUBPS256): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFNMSUBPD256): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBADDPS): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBADDPD): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBADDPS256): Likewise.
? ? ? ? ? ? ? (X86_BUILTIN_VFMSUBADDPD256): Likewise.

You don't need to add "negated" versions, one FMA builtin per mode is
enough, please see existing FMA4 descriptions. Just put unary minus
sign in the intrinsics header for "negated" operand and let GCC do its
job. Please see existing FMA4 intrinsics header.

? ? ? ? ? ? ? * config/i386/sse.md (fmai_fnmadd_): New.
? ? ? ? ? ? ? (fmai_fmsub_): Likewise.
? ? ? ? ? ? ? (fmai_fnmsub_): Likewise.
? ? ? ? ? ? ? (fmai_fmadd_s_): Likewise.
? ? ? ? ? ? ? (fmai_vmfmadd_s_): Likewise.
? ? ? ? ? ? ? (fmai_vmfmsub_s_): Likewise.
? ? ? ? ? ? ? (fmai_vmfnmadd_s_): Likewise.
? ? ? ? ? ? ? (fmai_vmfnmsub_s_): Likewise.
? ? ? ? ? ? ? (*fmai_fmadd_s_): Likewise.
? ? ? ? ? ? ? (*fmai_fmsub_s_): Likewise.
? ? ? ? ? ? ? (*fmai_fnmadd_s_): Likewise.
? ? ? ? ? ? ? (*fmai_fnmsub_s_): Likewise.
? ? ? ? ? ? ? (fmsubadd_): Likewise.

Also here. All your FMAMODE patterns should be expanded through
existing "fma4i_fmadd_" expander (you can rename it to
"fmai_fmadd..." to make its name more generic). This includes new
"fmsubadd_" pattern that should be expanded through existing
"fmaddsub_" expander.

vec_merge scalar versions also need only one expander, again follow
existing FMA4 version. Also, there is no need to include "_s_" in the
name. We know that these are scalar versions.

? ? ? ? ? ? ? * gcc.target/i386/fma-check.h: New.
? ? ? ? ? ? ? * gcc.target/i386/fma-256-fmaddXX.c: New testcase.
? ? ? ? ? ? ? * gcc.target/i386/fma-256-fmaddsubXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-256-fmsubXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-256-fmsubaddXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-256-fnmaddXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-256-fnmsubXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-fmaddXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-fmaddsubXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-fmsubXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-fmsubaddXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-fnmaddXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-fnmsubXX.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/fma-compile.c: Likewise.
? ? ? ? ? ? ? * gcc.target/i386/i386.exp (check_effective_target_fma): New.

Is there a reason that all runtime tests are compiled with -O0 except
that there are some existing FMA tests in the testsuite using -O0?
Usually, these kind of tests are compiled using -O2, so optimizations
are applied also to the builtins.

Uros.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-22 Thread Uros Bizjak
On Mon, Aug 22, 2011 at 6:25 PM, Ilya Tocar  wrote:

>> You don't need to add "negated" versions, one FMA builtin per mode is
>> enough, please see existing FMA4 descriptions. Just put unary minus
>> sign in the intrinsics header for "negated" operand and let GCC do its
>> job. Please see existing FMA4 intrinsics header.
>>
> Actually i tried that.But in such case  when i compile(FMA4 example)
> #include 
> extern  __m128 a,b,c;
> void foo(){
>   a = _mm_nmsub_ps(a,b,c);
> }
> with -S -O0 -mfma4
> The asm have
>
>        vxorps  %xmm1, %xmm0, %xmm0
>        vmovaps -16(%rbp), %xmm1
>        vmovaps .LC0(%rip), %xmm2
>        vxorps  %xmm2, %xmm1, %xmm1
>        vfmaddps        %xmm0, -32(%rbp), %xmm1, %xmm0
> So vfmaddps of negated values is generated instead of vfnmsubps.
> I think it is bad that intrinsic for  instruction can generate code
> without this instruction.
> So to make sure that exact instruction is always generated i
> introduced additional expands and builtins.
> Is it wrong?

This is artificial limitation. User requested the functionality of the
intrinsic, and should not bother with how the compiler realizes it.
With -O2, negation would propagate into the insn during combine pass,
and optimal instruction would be generated.

So, to answer your question - it is wrong to expect exact instruction
from builtins. Maybe from using -O0, but this should not be used
anyway in the testsuite.

Uros.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-23 Thread Uros Bizjak
On Tue, Aug 23, 2011 at 4:19 PM, Ilya Tocar  wrote:
> I removed unnecessary expands/builtins and tests are now compiled with -O2.
> Is this version ok?

OK with minor comments:

- Please remove extra blank lines you introduced in sse.md
- Also, I'd recomend you to pass new testcases through "indent"
command to fix formatting.

Thanks,
Uros.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-24 Thread Ilya Tocar
Removed extra blank lines and pass tests through "indent".

2011/8/23 Uros Bizjak :
> On Tue, Aug 23, 2011 at 4:19 PM, Ilya Tocar  wrote:
>> I removed unnecessary expands/builtins and tests are now compiled with -O2.
>> Is this version ok?
>
> OK with minor comments:
>
> - Please remove extra blank lines you introduced in sse.md
> - Also, I'd recomend you to pass new testcases through "indent"
> command to fix formatting.
>
> Thanks,
> Uros.
>


patch
Description: Binary data


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-24 Thread Jakub Jelinek
On Wed, Aug 24, 2011 at 12:48:06PM +0400, Ilya Tocar wrote:
> Removed extra blank lines and pass tests through "indent".

You haven't:

@@ -25113,6 +25125,9 @@ static const struct builtin_description 
bdesc_multi_arg[] = 
   
 "__builtin_ia32_vfmaddpd256", IX86_BUILTIN_VFMADDPD256,
   
 UNKNOWN, (int)MULTI_ARG_3_DF2 },   
   

   
+   
   
+   
   
+   
   
   { OPTION_MASK_ISA_FMA | OPTION_MASK_ISA_FMA4, CODE_FOR_fmaddsub_v4sf,
   
 "__builtin_ia32_vfmaddsubps", IX86_BUILTIN_VFMADDSUBPS,
   
 UNKNOWN, (int)MULTI_ARG_3_SF },
   

Also, why is fmaintrin.h including immintrin.h?  You can't include fmaintrin.h
directly and x86intrin.h has already included it before including fmaintrin.h.

Jakub


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-24 Thread Ilya Tocar
2011/8/24 Jakub Jelinek :
> On Wed, Aug 24, 2011 at 12:48:06PM +0400, Ilya Tocar wrote:
>> Removed extra blank lines and pass tests through "indent".
>
> You haven't:
Ah sorry only noticed one in sse.md.
>
> @@ -25113,6 +25125,9 @@ static const struct builtin_description 
> bdesc_multi_arg[] =
>     "__builtin_ia32_vfmaddpd256", IX86_BUILTIN_VFMADDPD256,
>     UNKNOWN, (int)MULTI_ARG_3_DF2 },
>
> +
> +
> +
>   { OPTION_MASK_ISA_FMA | OPTION_MASK_ISA_FMA4, CODE_FOR_fmaddsub_v4sf,
>     "__builtin_ia32_vfmaddsubps", IX86_BUILTIN_VFMADDSUBPS,
>     UNKNOWN, (int)MULTI_ARG_3_SF },
>
> Also, why is fmaintrin.h including immintrin.h?  You can't include fmaintrin.h
> directly and x86intrin.h has already included it before including fmaintrin.h.
Makes sense. Removed it.
>
>        Jakub
>


patch
Description: Binary data


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-24 Thread Uros Bizjak
On Wed, Aug 24, 2011 at 11:31 AM, Ilya Tocar  wrote:
> 2011/8/24 Jakub Jelinek :
>> On Wed, Aug 24, 2011 at 12:48:06PM +0400, Ilya Tocar wrote:
>>> Removed extra blank lines and pass tests through "indent".
>>
>> You haven't:
> Ah sorry only noticed one in sse.md.
>>
>> @@ -25113,6 +25125,9 @@ static const struct builtin_description 
>> bdesc_multi_arg[] =
>>     "__builtin_ia32_vfmaddpd256", IX86_BUILTIN_VFMADDPD256,
>>     UNKNOWN, (int)MULTI_ARG_3_DF2 },
>>
>> +
>> +
>> +
>>   { OPTION_MASK_ISA_FMA | OPTION_MASK_ISA_FMA4, CODE_FOR_fmaddsub_v4sf,
>>     "__builtin_ia32_vfmaddsubps", IX86_BUILTIN_VFMADDSUBPS,
>>     UNKNOWN, (int)MULTI_ARG_3_SF },
>>
>> Also, why is fmaintrin.h including immintrin.h?  You can't include 
>> fmaintrin.h
>> directly and x86intrin.h has already included it before including 
>> fmaintrin.h.
> Makes sense. Removed it.

Do we need to add -mfma to gcc.target/i386/sse-{12,13,14,22,23}.c and
g++.dg/other/i386-{2,3}.C to activate and test new intrinsics?

Uros.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-24 Thread Uros Bizjak
On Wed, Aug 24, 2011 at 2:39 PM, Ilya Tocar  wrote:

 Also, why is fmaintrin.h including immintrin.h?  You can't include 
 fmaintrin.h
 directly and x86intrin.h has already included it before including 
 fmaintrin.h.
>>> Makes sense. Removed it.
>>
>> Do we need to add -mfma to gcc.target/i386/sse-{12,13,14,22,23}.c and
>> g++.dg/other/i386-{2,3}.C to activate and test new intrinsics?
>>
>> Uros.
>>
> I think yes, otherwise fmaintrin.h won't be included and intrinsics
> won't be tested.
> Added -mfma to those tests.

The patch is OK for mainline with the proper ChangeLog.

Thanks,
Uros.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-25 Thread Uros Bizjak
On Thu, Aug 25, 2011 at 10:18 AM, Ilya Tocar  wrote:
> Changelog:
>
> 2011-08-25  Ilya Tocar  
>
>               * config/i386/fmaintrin.h: New.
>               * config.gcc: Add fmaintrin.h.
>               * config/i386/i386.c
>               *  (IX86_BUILTIN_VFMADDSS3): New.
>               (IX86_BUILTIN_VFMADDSD3): Likewise.

(enum ix86_builtins) : New.
: Likewise.

>               * config/i386/sse.md (fmai_vmfmadd_): New.
>               (*fmai_fmadd_): Likewise.
>               (*fmai_fmsub_): Likewise.
>               (*fmai_fnmadd_): Likewise.
>               (*fmai_fnmsub_): Likewise.
>               * config/i386/x86intrin.h: Add fmaintrin.h.
>
> And Changelog for testsuite:
>
> 2011-08-25  Ilya Tocar 
>
>               * gcc.target/i386/fma-check.h: New.
>               * gcc.target/i386/fma-256-fmaddXX.c: New testcase.
>               * gcc.target/i386/fma-256-fmaddsubXX.c: Likewise.
>               * gcc.target/i386/fma-256-fmsubXX.c: Likewise.
>               * gcc.target/i386/fma-256-fmsubaddXX.c: Likewise.
>               * gcc.target/i386/fma-256-fnmaddXX.c: Likewise.
>               * gcc.target/i386/fma-256-fnmsubXX.c: Likewise.
>               * gcc.target/i386/fma-fmaddXX.c: Likewise.
>               * gcc.target/i386/fma-fmaddsubXX.c: Likewise.
>               * gcc.target/i386/fma-fmsubXX.c: Likewise.
>               * gcc.target/i386/fma-fmsubaddXX.c: Likewise.
>               * gcc.target/i386/fma-fnmaddXX.c: Likewise.
>               * gcc.target/i386/fma-fnmsubXX.c: Likewise.
>               * gcc.target/i386/fma-compile.c: Likewise.
>               * gcc.target/i386/i386.exp (check_effective_target_fma): New.
>               * gcc.target/i386/sse-12.c: Add -mfma.
>               * gcc.target/i386/sse-13.c: Likewise.
>               * gcc.target/i386/sse-14.c: Likewise.
>               * gcc.target/i386/sse-22.c: Likewise.
>               * gcc.target/i386/sse-23.c: Likewise.
>               * gcc.target/i386/sse-13.c: Likewise.

Duplicate.

>               * g++.dg/other/i386-2.c: Likewise.

*g++.dg/other/i386-2.C

>               * g++.dg/other/i386-2.c: Likewise.

* g++.dg/other/i386-3.C

Uros.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-25 Thread Ilya Tocar
Sorry. Like this?

Changelog:

2011-08-25  Ilya Tocar  

             * config/i386/fmaintrin.h: New.
             * config.gcc: Add fmaintrin.h.
             * config/i386/i386.c
 (enum ix86_builtins) : New.
             : Likewise.
             * config/i386/sse.md (fmai_vmfmadd_): New.
             (*fmai_fmadd_): Likewise.
             (*fmai_fmsub_): Likewise.
             (*fmai_fnmadd_): Likewise.
             (*fmai_fnmsub_): Likewise.
             * config/i386/x86intrin.h: Add fmaintrin.h.

And Changelog for testsuite:

2011-08-25  Ilya Tocar 

             * gcc.target/i386/fma-check.h: New.
             * gcc.target/i386/fma-256-fmaddXX.c: New testcase.
             * gcc.target/i386/fma-256-fmaddsubXX.c: Likewise.
             * gcc.target/i386/fma-256-fmsubXX.c: Likewise.
             * gcc.target/i386/fma-256-fmsubaddXX.c: Likewise.
             * gcc.target/i386/fma-256-fnmaddXX.c: Likewise.
             * gcc.target/i386/fma-256-fnmsubXX.c: Likewise.
             * gcc.target/i386/fma-fmaddXX.c: Likewise.
             * gcc.target/i386/fma-fmaddsubXX.c: Likewise.
             * gcc.target/i386/fma-fmsubXX.c: Likewise.
             * gcc.target/i386/fma-fmsubaddXX.c: Likewise.
             * gcc.target/i386/fma-fnmaddXX.c: Likewise.
             * gcc.target/i386/fma-fnmsubXX.c: Likewise.
             * gcc.target/i386/fma-compile.c: Likewise.
             * gcc.target/i386/i386.exp (check_effective_target_fma): New.
             * gcc.target/i386/sse-12.c: Add -mfma.
             * gcc.target/i386/sse-13.c: Likewise.
             * gcc.target/i386/sse-14.c: Likewise.
             * gcc.target/i386/sse-22.c: Likewise.
             * gcc.target/i386/sse-23.c: Likewise.
             * gcc.target/i386/sse-13.c: Likewise.
             * g++.dg/other/i386-2.c: Likewise.
             * g++.dg/other/i386-3.c: Likewise.

2011/8/25 Uros Bizjak :
> On Thu, Aug 25, 2011 at 10:18 AM, Ilya Tocar  wrote:
>> Changelog:
>>
>> 2011-08-25  Ilya Tocar  
>>
>>               * config/i386/fmaintrin.h: New.
>>               * config.gcc: Add fmaintrin.h.
>>               * config/i386/i386.c
>>               *  (IX86_BUILTIN_VFMADDSS3): New.
>>               (IX86_BUILTIN_VFMADDSD3): Likewise.
>
> (enum ix86_builtins) : New.
> : Likewise.
>
>>               * config/i386/sse.md (fmai_vmfmadd_): New.
>>               (*fmai_fmadd_): Likewise.
>>               (*fmai_fmsub_): Likewise.
>>               (*fmai_fnmadd_): Likewise.
>>               (*fmai_fnmsub_): Likewise.
>>               * config/i386/x86intrin.h: Add fmaintrin.h.
>>
>> And Changelog for testsuite:
>>
>> 2011-08-25  Ilya Tocar 
>>
>>               * gcc.target/i386/fma-check.h: New.
>>               * gcc.target/i386/fma-256-fmaddXX.c: New testcase.
>>               * gcc.target/i386/fma-256-fmaddsubXX.c: Likewise.
>>               * gcc.target/i386/fma-256-fmsubXX.c: Likewise.
>>               * gcc.target/i386/fma-256-fmsubaddXX.c: Likewise.
>>               * gcc.target/i386/fma-256-fnmaddXX.c: Likewise.
>>               * gcc.target/i386/fma-256-fnmsubXX.c: Likewise.
>>               * gcc.target/i386/fma-fmaddXX.c: Likewise.
>>               * gcc.target/i386/fma-fmaddsubXX.c: Likewise.
>>               * gcc.target/i386/fma-fmsubXX.c: Likewise.
>>               * gcc.target/i386/fma-fmsubaddXX.c: Likewise.
>>               * gcc.target/i386/fma-fnmaddXX.c: Likewise.
>>               * gcc.target/i386/fma-fnmsubXX.c: Likewise.
>>               * gcc.target/i386/fma-compile.c: Likewise.
>>               * gcc.target/i386/i386.exp (check_effective_target_fma): New.
>>               * gcc.target/i386/sse-12.c: Add -mfma.
>>               * gcc.target/i386/sse-13.c: Likewise.
>>               * gcc.target/i386/sse-14.c: Likewise.
>>               * gcc.target/i386/sse-22.c: Likewise.
>>               * gcc.target/i386/sse-23.c: Likewise.
>>               * gcc.target/i386/sse-13.c: Likewise.
>
> Duplicate.
>
>>               * g++.dg/other/i386-2.c: Likewise.
>
> *g++.dg/other/i386-2.C
>
>>               * g++.dg/other/i386-2.c: Likewise.
>
> * g++.dg/other/i386-3.C
>
> Uros.
>


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-25 Thread Jakub Jelinek
On Thu, Aug 25, 2011 at 02:47:51PM +0400, Ilya Tocar wrote:
> Sorry. Like this?

No.
>              * gcc.target/i386/sse-12.c: Add -mfma.
>              * gcc.target/i386/sse-13.c: Likewise.
>              * gcc.target/i386/sse-14.c: Likewise.
>              * gcc.target/i386/sse-22.c: Likewise.
>              * gcc.target/i386/sse-23.c: Likewise.
>              * gcc.target/i386/sse-13.c: Likewise.

The above line still needs to be removed.

>              * g++.dg/other/i386-2.c: Likewise.
>              * g++.dg/other/i386-3.c: Likewise.

And there is missing s/\.c/.C/ in the above two lines.

Jakub


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-25 Thread Ilya Tocar
Fixed.

Changelog:

2011-08-25  Ilya Tocar  

 * config/i386/fmaintrin.h: New.
 * config.gcc: Add fmaintrin.h.
 * config/i386/i386.c
(enum ix86_builtins) : New.
 : Likewise.
 * config/i386/sse.md (fmai_vmfmadd_): New.
 (*fmai_fmadd_): Likewise.
 (*fmai_fmsub_): Likewise.
 (*fmai_fnmadd_): Likewise.
 (*fmai_fnmsub_): Likewise.
 * config/i386/x86intrin.h: Add fmaintrin.h.

And Changelog for testsuite:

2011-08-25  Ilya Tocar 

 * gcc.target/i386/fma-check.h: New.
 * gcc.target/i386/fma-256-fmaddXX.c: New testcase.
 * gcc.target/i386/fma-256-fmaddsubXX.c: Likewise.
 * gcc.target/i386/fma-256-fmsubXX.c: Likewise.
 * gcc.target/i386/fma-256-fmsubaddXX.c: Likewise.
 * gcc.target/i386/fma-256-fnmaddXX.c: Likewise.
 * gcc.target/i386/fma-256-fnmsubXX.c: Likewise.
 * gcc.target/i386/fma-fmaddXX.c: Likewise.
 * gcc.target/i386/fma-fmaddsubXX.c: Likewise.
 * gcc.target/i386/fma-fmsubXX.c: Likewise.
 * gcc.target/i386/fma-fmsubaddXX.c: Likewise.
 * gcc.target/i386/fma-fnmaddXX.c: Likewise.
 * gcc.target/i386/fma-fnmsubXX.c: Likewise.
 * gcc.target/i386/fma-compile.c: Likewise.
 * gcc.target/i386/i386.exp (check_effective_target_fma): New.
 * gcc.target/i386/sse-12.c: Add -mfma.
 * gcc.target/i386/sse-13.c: Likewise.
 * gcc.target/i386/sse-14.c: Likewise.
 * gcc.target/i386/sse-22.c: Likewise.
 * gcc.target/i386/sse-23.c: Likewise.
 * g++.dg/other/i386-2.C: Likewise.
 * g++.dg/other/i386-3.C: Likewise.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-26 Thread H.J. Lu
On Fri, Aug 26, 2011 at 1:41 AM, Ilya Tocar  wrote:
> So if this is ok can someone please commit it?
>
> 2011/8/25 Ilya Tocar :
>> Fixed.
>>
>> Changelog:
>>
>> 2011-08-25  Ilya Tocar  
>>
>>             * config/i386/fmaintrin.h: New.
>>             * config.gcc: Add fmaintrin.h.
>>             * config/i386/i386.c
>>            (enum ix86_builtins) : New.
>>             : Likewise.
>>             * config/i386/sse.md (fmai_vmfmadd_): New.
>>             (*fmai_fmadd_): Likewise.
>>             (*fmai_fmsub_): Likewise.
>>             (*fmai_fnmadd_): Likewise.
>>             (*fmai_fnmsub_): Likewise.
>>             * config/i386/x86intrin.h: Add fmaintrin.h.
>>

Please include fmaintrin.h in immintrin.h, not x86intrin.h, since
immintrin.h should include all Intel intrinsics.


-- 
H.J.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-26 Thread H.J. Lu
On Fri, Aug 26, 2011 at 8:06 AM, Ilya Tocar  wrote:
> Done.
>
>
>
> Also fixed  changelog:
>
>  2011-08-26  Ilya Tocar  
>
>             * config/i386/fmaintrin.h: New.
>             * config.gcc: Add fmaintrin.h.
>             * config/i386/i386.c
>            (enum ix86_builtins) : New.
>             : Likewise.
>             * config/i386/sse.md (fmai_vmfmadd_): New.
>             (*fmai_fmadd_): Likewise.
>             (*fmai_fmsub_): Likewise.
>             (*fmai_fnmadd_): Likewise.
>             (*fmai_fnmsub_): Likewise.
>             * config/i386/immintrin.h: Add fmaintrin.h.
>


-- +++ b/gcc/config/i386/fmaintrin.h
@@ -0,0 +1,229 @@
+/* Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+

It should be just 2011.

H.J.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-26 Thread H.J. Lu
On Fri, Aug 26, 2011 at 8:47 AM, H.J. Lu  wrote:
> On Fri, Aug 26, 2011 at 8:06 AM, Ilya Tocar  wrote:
>> Done.
>>
>>
>>
>> Also fixed  changelog:
>>
>>  2011-08-26  Ilya Tocar  
>>
>>             * config/i386/fmaintrin.h: New.
>>             * config.gcc: Add fmaintrin.h.
>>             * config/i386/i386.c
>>            (enum ix86_builtins) : New.
>>             : Likewise.
>>             * config/i386/sse.md (fmai_vmfmadd_): New.
>>             (*fmai_fmadd_): Likewise.
>>             (*fmai_fmsub_): Likewise.
>>             (*fmai_fnmadd_): Likewise.
>>             (*fmai_fnmsub_): Likewise.
>>             * config/i386/immintrin.h: Add fmaintrin.h.
>>
>
>
> -- +++ b/gcc/config/i386/fmaintrin.h
> @@ -0,0 +1,229 @@
> +/* Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
> +
>
> It should be just 2011.
>

Also lines in fmaintrin.h are too long.  I prefer 72 columns.


-- 
H.J.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-30 Thread H.J. Lu
On Tue, Aug 30, 2011 at 2:42 AM, Ilya Tocar  wrote:
> Fixed.
>
> 2011/8/26 H.J. Lu :
>> On Fri, Aug 26, 2011 at 8:47 AM, H.J. Lu  wrote:
>>> On Fri, Aug 26, 2011 at 8:06 AM, Ilya Tocar  wrote:
 Done.



 Also fixed  changelog:

  2011-08-26  Ilya Tocar  

             * config/i386/fmaintrin.h: New.
             * config.gcc: Add fmaintrin.h.
             * config/i386/i386.c
            (enum ix86_builtins) : New.
             : Likewise.
             * config/i386/sse.md (fmai_vmfmadd_): New.
             (*fmai_fmadd_): Likewise.
             (*fmai_fmsub_): Likewise.
             (*fmai_fnmadd_): Likewise.
             (*fmai_fnmsub_): Likewise.
             * config/i386/immintrin.h: Add fmaintrin.h.

>>>
>>>
>>> -- +++ b/gcc/config/i386/fmaintrin.h
>>> @@ -0,0 +1,229 @@
>>> +/* Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 
>>> Inc.
>>> +
>>>
>>> It should be just 2011.
>>>
>>
>> Also lines in fmaintrin.h are too long.  I prefer 72 columns.
>>

Your patch won't apply.  Please merge with master first and regenerate it.

-- 
H.J.


Re: [PATCH, i386, testsuite] FMA intrinsics

2011-08-30 Thread H.J. Lu
On Tue, Aug 30, 2011 at 6:55 AM, Ilya Tocar  wrote:
> Little fix.
>
> 2011/8/30 Ilya Tocar :
>> Sorry. Regenerated.
>>
>> 2011/8/30 H.J. Lu :
>>> On Tue, Aug 30, 2011 at 2:42 AM, Ilya Tocar  wrote:
 Fixed.

 2011/8/26 H.J. Lu :
> On Fri, Aug 26, 2011 at 8:47 AM, H.J. Lu  wrote:
>> On Fri, Aug 26, 2011 at 8:06 AM, Ilya Tocar  
>> wrote:
>>> Done.
>>>
>>>
>>>
>>> Also fixed  changelog:
>>>
>>>  2011-08-26  Ilya Tocar  
>>>
>>>             * config/i386/fmaintrin.h: New.
>>>             * config.gcc: Add fmaintrin.h.
>>>             * config/i386/i386.c
>>>            (enum ix86_builtins) : New.
>>>             : Likewise.
>>>             * config/i386/sse.md (fmai_vmfmadd_): New.
>>>             (*fmai_fmadd_): Likewise.
>>>             (*fmai_fmsub_): Likewise.
>>>             (*fmai_fnmadd_): Likewise.
>>>             (*fmai_fnmsub_): Likewise.
>>>             * config/i386/immintrin.h: Add fmaintrin.h.
>>>
>>
>>
>> -- +++ b/gcc/config/i386/fmaintrin.h
>> @@ -0,0 +1,229 @@
>> +/* Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 
>> Inc.
>> +
>>
>> It should be just 2011.
>>
>
> Also lines in fmaintrin.h are too long.  I prefer 72 columns.
>
>>>
>>> Your patch won't apply.  Please merge with master first and regenerate it.
>>>

I checked it in for you.

Thanks.

-- 
H.J.