Re: [i386] New testcase (was: [rtl, patch] combine concat+shuffle)

2012-05-28 Thread Uros Bizjak
On Mon, May 28, 2012 at 3:37 PM, Marc Glisse wrote: > > Ping? The rest of the patch has been approved already. > > > On Thu, 10 May 2012, Marc Glisse wrote: > >> Hello, >> >> could an i386 maintainer take a look at the following testcase? >> >> gcc/testsuite/ChangeLog >> 2012-05-08  Marc Glisse  

Re: [i386] New testcase (was: [rtl, patch] combine concat+shuffle)

2012-05-28 Thread Marc Glisse
Ping? The rest of the patch has been approved already. On Thu, 10 May 2012, Marc Glisse wrote: Hello, could an i386 maintainer take a look at the following testcase? gcc/testsuite/ChangeLog 2012-05-08 Marc Glisse * gcc.target/i386/shuf-concat.c: New test. --- gcc.target/i386/s

[i386] New testcase (was: [rtl, patch] combine concat+shuffle)

2012-05-10 Thread Marc Glisse
Hello, could an i386 maintainer take a look at the following testcase? gcc/testsuite/ChangeLog 2012-05-08 Marc Glisse * gcc.target/i386/shuf-concat.c: New test. --- gcc.target/i386/shuf-concat.c (revision 0) +++ gcc.target/i386/shuf-concat.c (revision 0) @@ -0,0 +1,13 @

Re: [rtl, patch] combine concat+shuffle

2012-05-08 Thread Marc Glisse
On Tue, 8 May 2012, Richard Sandiford wrote: Marc Glisse writes: Here is a new version. gcc/ChangeLog 2012-05-08 Marc Glisse * simplify-rtx.c (simplify_binary_operation_1): Optimize shuffle of concatenations. OK, thanks. I'll leave an x86 maintainer to review the testca

Re: [rtl, patch] combine concat+shuffle

2012-05-08 Thread Richard Sandiford
Marc Glisse writes: > Here is a new version. > > gcc/ChangeLog > 2012-05-08 Marc Glisse > > * simplify-rtx.c (simplify_binary_operation_1): Optimize shuffle > of concatenations. OK, thanks. I'll leave an x86 maintainer to review the testcase, but it looks like it'll need some mark

Re: [rtl, patch] combine concat+shuffle

2012-05-08 Thread Marc Glisse
Here is a new version. gcc/ChangeLog 2012-05-08 Marc Glisse * simplify-rtx.c (simplify_binary_operation_1): Optimize shuffle of concatenations. gcc/testsuite/ChangeLog 2012-05-08 Marc Glisse * gcc.target/i386/shuf-concat.c: New test. On Tue, 8 May 2012, Richard

Re: [rtl, patch] combine concat+shuffle

2012-05-08 Thread Richard Sandiford
Marc Glisse writes: >> Realised afterwards that both versions need to check >> GET_MODE_NUNITS (mode) == 2, because we're requiring OP0 and OP1 >> to be scalar. Sorry for not noticing first time. > > I thought that was a consequence of > > XVECLEN (trueop1, 0) == 2 > > (in the lines before your f

Re: [rtl, patch] combine concat+shuffle

2012-05-08 Thread Marc Glisse
On Tue, 8 May 2012, Richard Sandiford wrote: Marc Glisse writes: On Tue, 8 May 2012, Richard Sandiford wrote: I know you said that generalising it could be done later, and that's fine, but it looks in some ways like it would be easier to go straight for the more general: && GET_COD

Re: [rtl, patch] combine concat+shuffle

2012-05-08 Thread Richard Sandiford
Marc Glisse writes: > On Tue, 8 May 2012, Richard Sandiford wrote: >> I know you said that generalising it could be done later, >> and that's fine, but it looks in some ways like it would >> be easier to go straight for the more general: >> >>&& GET_CODE (trueop0) == VEC_CONCAT >>&

Re: [rtl, patch] combine concat+shuffle

2012-05-08 Thread Marc Glisse
On Tue, 8 May 2012, Richard Sandiford wrote: I know you said that generalising it could be done later, and that's fine, but it looks in some ways like it would be easier to go straight for the more general: && GET_CODE (trueop0) == VEC_CONCAT && GET_CODE (XEXP (trueop0, 0))

Re: [rtl, patch] combine concat+shuffle

2012-05-08 Thread Richard Sandiford
Looks like a good idea. Marc Glisse writes: > For the testsuite, since the patch is not in a particular target, it would > be better to have a generic test (in gcc.dg?), but I don't really know how > to write a generic one, so would a test in gcc.target/i386 that scans > the asm for shuf or pe

[rtl, patch] combine concat+shuffle

2012-05-07 Thread Marc Glisse
Hello, this patch combines for vectors a concat and a shuffle. An example on x86 would be: __m128d f(double d){ __m128d x=_mm_setr_pd(-d,d); return _mm_shuffle_pd(x,x,1); } which was compiled as: vmovsd .LC0(%rip), %xmm1 vxorpd %xmm0, %xmm1, %xmm1 vunpcklpd