Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-15 Thread Uros Bizjak
On Wed, Aug 15, 2018 at 6:33 AM, Jeff Law wrote: > On 08/11/2018 03:54 AM, Allan Sandfeld Jensen wrote: >> On Samstag, 11. August 2018 11:18:39 CEST Jakub Jelinek wrote: >>> On Sat, Aug 11, 2018 at 10:59:26AM +0200, Allan Sandfeld Jensen wrote: +/* A subroutine of

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-14 Thread Jeff Law
On 08/11/2018 03:54 AM, Allan Sandfeld Jensen wrote: > On Samstag, 11. August 2018 11:18:39 CEST Jakub Jelinek wrote: >> On Sat, Aug 11, 2018 at 10:59:26AM +0200, Allan Sandfeld Jensen wrote: >>> +/* A subroutine of ix86_expand_vec_perm_builtin_1. Try to implement D >>> + using movss or movsd.

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-12 Thread Uros Bizjak
On Sat, Aug 11, 2018 at 11:54 AM, Allan Sandfeld Jensen wrote: > On Samstag, 11. August 2018 11:18:39 CEST Jakub Jelinek wrote: >> On Sat, Aug 11, 2018 at 10:59:26AM +0200, Allan Sandfeld Jensen wrote: >> > +/* A subroutine of ix86_expand_vec_perm_builtin_1. Try to implement D >> > + using

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-11 Thread Allan Sandfeld Jensen
On Samstag, 11. August 2018 11:18:39 CEST Jakub Jelinek wrote: > On Sat, Aug 11, 2018 at 10:59:26AM +0200, Allan Sandfeld Jensen wrote: > > +/* A subroutine of ix86_expand_vec_perm_builtin_1. Try to implement D > > + using movss or movsd. */ > > +static bool > > +expand_vec_perm_movs (struct

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-11 Thread Jakub Jelinek
On Sat, Aug 11, 2018 at 10:59:26AM +0200, Allan Sandfeld Jensen wrote: > +/* A subroutine of ix86_expand_vec_perm_builtin_1. Try to implement D > + using movss or movsd. */ > +static bool > +expand_vec_perm_movs (struct expand_vec_perm_d *d) > +{ > + machine_mode vmode = d->vmode; > +

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-11 Thread Allan Sandfeld Jensen
Updated: Match movss and movsd "blend" instructions Adds the ability to match movss and movsd as blend patterns, implemented in a new method to be able to match these before shuffles, while keeping other blends after. 2018-08-11 Allan Sandfeld Jensen gcc/config/i386 * i386.cc

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-02 Thread Allan Sandfeld Jensen
On Donnerstag, 2. August 2018 23:15:28 CEST Marc Glisse wrote: > On Thu, 2 Aug 2018, Allan Sandfeld Jensen wrote: > > I forgot. One of the things that makes using __builtin_shuffle ugly is > > that > > __v4si as the suffle argument needs to be in _mm_move_ss, is declared > > in emmintrin.h, but

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-02 Thread Allan Sandfeld Jensen
On Donnerstag, 2. August 2018 23:46:37 CEST Jakub Jelinek wrote: > On Thu, Aug 02, 2018 at 10:50:58PM +0200, Allan Sandfeld Jensen wrote: > > Here is the version with __builtin_shuffle. It might be more expectable > > -O0, but it is also uglier. > > I don't find anything ugly on it, except the

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-02 Thread Jakub Jelinek
On Thu, Aug 02, 2018 at 10:50:58PM +0200, Allan Sandfeld Jensen wrote: > Here is the version with __builtin_shuffle. It might be more expectable -O0, > but it is also uglier. I don't find anything ugly on it, except the formatting glitches (missing space before (, overlong line, and useless

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-02 Thread Marc Glisse
On Thu, 2 Aug 2018, Allan Sandfeld Jensen wrote: I forgot. One of the things that makes using __builtin_shuffle ugly is that __v4si as the suffle argument needs to be in _mm_move_ss, is declared in emmintrin.h, but _mm_move_ss is in xmmintrin.h. __v4si is some internal detail, I don't see

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-02 Thread Allan Sandfeld Jensen
On Donnerstag, 2. August 2018 11:18:41 CEST Richard Biener wrote: > On Thu, Aug 2, 2018 at 11:12 AM Allan Sandfeld Jensen > > wrote: > > On Mittwoch, 1. August 2018 18:51:41 CEST Marc Glisse wrote: > > > On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote: > > > > extern __inline __m128d

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-02 Thread Allan Sandfeld Jensen
On Mittwoch, 1. August 2018 18:51:41 CEST Marc Glisse wrote: > On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote: > > extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, > > > > __artificial__)) > > > > _mm_move_sd (__m128d __A, __m128d __B) > > { > > > > - return

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-02 Thread Richard Biener
On Thu, Aug 2, 2018 at 11:12 AM Allan Sandfeld Jensen wrote: > > On Mittwoch, 1. August 2018 18:51:41 CEST Marc Glisse wrote: > > On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote: > > > extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, > > > > > > __artificial__)) > > > >

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-02 Thread Allan Sandfeld Jensen
On Mittwoch, 1. August 2018 18:51:41 CEST Marc Glisse wrote: > On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote: > > extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, > > > > __artificial__)) > > > > _mm_move_sd (__m128d __A, __m128d __B) > > { > > > > - return

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-01 Thread Marc Glisse
On Wed, 1 Aug 2018, Allan Sandfeld Jensen wrote: extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_move_sd (__m128d __A, __m128d __B) { - return (__m128d) __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); + return __extension__

[PATCH][x86] Match movss and movsd "blend" instructions

2018-08-01 Thread Allan Sandfeld Jensen
Adds the ability to match movss and movsd as blend patterns, implemented in a new method to be able to match these before shuffles, while keeping other blends after. 2018-07-29 Allan Sandfeld Jensen gcc/config/i386 * i386.cc (expand_vec_perm_movs): New method matching movs patterns.