Re: Vector shuffling

2011-09-28 Thread Artem Shinkarov
On Thu, Sep 15, 2011 at 8:05 PM, Richard Henderson r...@redhat.com wrote: +The elements of the input vectors are numbered from left to right across +one or both of the vectors. Each element in the mask specifies a number +of element from the input vector(s). Consider the following example. It

Re: Vector Comparison patch

2011-09-30 Thread Artem Shinkarov
On Fri, Sep 30, 2011 at 4:01 PM, Georg-Johann Lay a...@gjlay.de wrote: Artem Shinkarov schrieb: Here is a new version of the patch which considers the changes from 2011-09-02  Richard Guenther ChangeLog 20011-09-06 Artjoms Sinkarovs artyom.shinkar...@gmail.com        gcc/        * fold

Re: Vector Comparison patch

2011-09-30 Thread Artem Shinkarov
On Fri, Sep 30, 2011 at 4:43 PM, Jakub Jelinek ja...@redhat.com wrote: On Fri, Sep 30, 2011 at 05:36:47PM +0200, Georg-Johann Lay wrote: The target has 2 = sizeof (short) 2 = sizeof (int) 4 = sizeof (long int) 8 = sizeof (long long int) Could you fix that? I.e. parametrize

Re: Vector Comparison patch

2011-09-30 Thread Artem Shinkarov
On Fri, Sep 30, 2011 at 4:54 PM, Jakub Jelinek ja...@redhat.com wrote: On Fri, Sep 30, 2011 at 04:48:41PM +0100, Artem Shinkarov wrote: Most likely we can. The question is what do we really want to check with this test. My intention was to check that a programmer can statically get

Re: Vector shuffling

2011-10-03 Thread Artem Shinkarov
Hi, can anyone commit it please? Richard? Or may be Richard? Thanks, Artem. On Sat, Oct 1, 2011 at 12:21 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Sorry for that, the vector comparison was submitted earlier. In the attachment there is a new version of the patch against

Re: Vector shuffling

2011-10-03 Thread Artem Shinkarov
On Mon, Oct 3, 2011 at 6:12 PM, Richard Henderson r...@redhat.com wrote: On 10/03/2011 09:43 AM, Artem Shinkarov wrote: Hi, Richard There is a problem with the testcases of the patch you have committed for me. The code in every test-case is doubled. Could you please, apply the following

Re: Vector Shuffle plans

2011-10-03 Thread Artem Shinkarov
On Mon, Oct 3, 2011 at 7:07 PM, Richard Henderson r...@redhat.com wrote: On 10/03/2011 10:42 AM, David Miller wrote: You might have a look at the Vector Shuffle thread, where we've been trying to provide builtin-level access to this feature.  We've not added an rtx-level code for this because

Re: Vector Shuffle plans

2011-10-03 Thread Artem Shinkarov
On Mon, Oct 3, 2011 at 8:02 PM, Richard Henderson r...@redhat.com wrote: On 10/03/2011 11:40 AM, Artem Shinkarov wrote: Currently if vec_perm_ok returns false, we do not try to use a new vshuffle routine. Would it make sense to implement that? The only potential problem I can see is a possible

Re: Vector shuffling

2011-10-03 Thread Artem Shinkarov
On Mon, Oct 3, 2011 at 6:12 PM, Richard Henderson r...@redhat.com wrote: On 10/03/2011 09:43 AM, Artem Shinkarov wrote: Hi, Richard There is a problem with the testcases of the patch you have committed for me. The code in every test-case is doubled. Could you please, apply the following

Re: Vector shuffling

2011-10-04 Thread Artem Shinkarov
Ping. Richard, the patch in the attachment should be submitted asap. The other problem could wait for a while. Thanks, Artem. On Tue, Oct 4, 2011 at 12:04 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Mon, Oct 3, 2011 at 6:12 PM, Richard Henderson r...@redhat.com wrote: On 10/03

Fix pr50607 bconstp-3.c failure

2011-10-04 Thread Artem Shinkarov
Hi Here is the patch tho fix bconstp-3.c failure in the bug 50607. The failure was cause because the new parser routine did not consider original_tree_code of the expression. The patch is bootstrapped on x86-unknown-linux-gnu and is being tested. Thanks, Artem. Index: c-parser.c

New warning for expanded vector operations

2011-10-04 Thread Artem Shinkarov
the warning. (lower_vec_shuffle): Adjust to produce the warning. * gcc/common.opt: New warning Wvector-operation-expanded. * gcc/doc/invoke.texi: Document the wawning. Ok? Thanks, Artem Shinkarov. P.S. It is hard to write a reasonable testcase for the patch, because one needs

Re: Fix pr50607 bconstp-3.c failure

2011-10-04 Thread Artem Shinkarov
On Tue, Oct 4, 2011 at 11:51 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Tue, 4 Oct 2011, Artem Shinkarov wrote: Hi Here is the patch tho fix bconstp-3.c failure in the bug 50607. The failure was cause because the new parser routine did not consider original_tree_code

Re: Fix pr50607 bconstp-3.c failure

2011-10-05 Thread Artem Shinkarov
On Wed, Oct 5, 2011 at 4:22 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 5 Oct 2011, Artem Shinkarov wrote: On Tue, Oct 4, 2011 at 11:51 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Tue, 4 Oct 2011, Artem Shinkarov wrote: Hi Here is the patch tho fix bconstp-3

Re: Fix pr50607 bconstp-3.c failure

2011-10-05 Thread Artem Shinkarov
On Wed, Oct 5, 2011 at 5:28 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 5 Oct 2011, Artem Shinkarov wrote: Joseph, is it possible to commit the patch together with the space fixes? You should not commit whitespace fixes to lines not otherwise modified by a patch, except

Re: Fix pr50607 bconstp-3.c failure

2011-10-05 Thread Artem Shinkarov
On Wed, Oct 5, 2011 at 5:32 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Wed, Oct 5, 2011 at 5:28 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 5 Oct 2011, Artem Shinkarov wrote: Joseph, is it possible to commit the patch together with the space fixes? You should

Re: Fix pr50607 bconstp-3.c failure

2011-10-05 Thread Artem Shinkarov
On Thu, Oct 6, 2011 at 3:27 AM, Hans-Peter Nilsson h...@bitrange.com wrote: On Thu, 6 Oct 2011, Artem Shinkarov wrote: Successfully regtested on x86-unknown-linux-gnu. Committed to the mainline with the revision 179588. ChangeLog: 2011-10-06  Artjoms Sinkarovs  artyom.shinkar...@gmail.com

Re: New warning for expanded vector operations

2011-10-06 Thread Artem Shinkarov
On Wed, Oct 5, 2011 at 12:35 PM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Oct 5, 2011 at 1:28 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Wed, Oct 5, 2011 at 9:40 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Oct 5, 2011 at 12:18 AM, Artem

Re: New warning for expanded vector operations

2011-10-07 Thread Artem Shinkarov
On Fri, Oct 7, 2011 at 6:22 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Wed, Oct 5, 2011 at 12:35 PM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Oct 5, 2011 at 1:28 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Wed, Oct 5, 2011 at 9:40 AM, Richard

Re: New warning for expanded vector operations

2011-10-10 Thread Artem Shinkarov
On Mon, Oct 10, 2011 at 12:02 PM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Oct 7, 2011 at 9:44 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Fri, Oct 7, 2011 at 6:22 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Wed, Oct 5, 2011 at 12:35 PM, Richard

Re: New warning for expanded vector operations

2011-10-11 Thread Artem Shinkarov
On Tue, Oct 11, 2011 at 11:52 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Oct 10, 2011 at 3:21 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Mon, Oct 10, 2011 at 12:02 PM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Oct 7, 2011 at 9:44 AM, Artem

Re: New warning for expanded vector operations

2011-10-12 Thread Artem Shinkarov
wrote: On Tue, Oct 11, 2011 at 9:11 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Committed with the revision 179807. This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50704 -- H.J. fix-performance-tests.diff Description: Binary data

Re: New warning for expanded vector operations

2011-10-13 Thread Artem Shinkarov
On Thu, Oct 13, 2011 at 10:23 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Oct 13, 2011 at 10:59 AM, Mike Stump mikest...@comcast.net wrote: On Oct 12, 2011, at 2:37 PM, Artem Shinkarov wrote: This patch fixed PR50704. gcc/testsuite:        * gcc.target/i386/warn-vect-op-3

Vector alignment tracking

2011-10-13 Thread Artem Shinkarov
Hi I would like to share some plans about improving the situation with vector alignment tracking. First of all, I would like to start with a well-known bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50716. There are several aspects of the problem: 1) We would like to avoid the quiet

Re: New warning for expanded vector operations

2011-10-14 Thread Artem Shinkarov
On Thu, Oct 13, 2011 at 10:40 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Thu, Oct 13, 2011 at 10:23 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Oct 13, 2011 at 10:59 AM, Mike Stump mikest...@comcast.net wrote: On Oct 12, 2011, at 2:37 PM, Artem Shinkarov wrote

Scalar vector binary operation

2011-08-09 Thread Artem Shinkarov
This is a patch that was approved a long time ago here: http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01833.html but was never submitted. 2011-08-09 Artjoms Sinkarovs artyom.shinakr...@gmail.com /gcc * c-typeck.c (scalar_to_vector): New function. Try scalar to vector conversion. (stv_conv):

Re: Scalar vector binary operation

2011-08-09 Thread Artem Shinkarov
Sorry, I didn't attach the patch itself. Here we go, in the attachment. Artem. Index: gcc/doc/extend.texi === --- gcc/doc/extend.texi (revision 177589) +++ gcc/doc/extend.texi (working copy) @@ -6526,18 +6526,25 @@ In C it is

Re: Vector Comparison patch

2011-08-15 Thread Artem Shinkarov
On Mon, Aug 15, 2011 at 3:24 PM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Aug 12, 2011 at 4:03 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Hi Here is a completed version of the vector comparison patch we discussed a long time ago here: http://gcc.gnu.org/ml/gcc

Re: Vector Comparison patch

2011-08-16 Thread Artem Shinkarov
On Tue, Aug 16, 2011 at 4:28 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 15, 2011 at 6:58 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Mon, Aug 15, 2011 at 3:24 PM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Aug 12, 2011 at 4:03 AM, Artem

Re: Vector Comparison patch

2011-08-17 Thread Artem Shinkarov
Hi Several comments before the new version of the patch. 1) x != x I am happy to adjust constant_boolean_node, but look at the code around line 9074 in fold-const.c, you will see that x op x elimination, even with adjusted constant_boolean_node, will look about the same as my code. Because I need

Re: Vector Comparison patch

2011-08-17 Thread Artem Shinkarov
On Wed, Aug 17, 2011 at 3:58 PM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Aug 17, 2011 at 3:30 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Hi Several comments before the new version of the patch. 1) x != x I am happy to adjust constant_boolean_node, but look

Re: Vector Comparison patch

2011-08-18 Thread Artem Shinkarov
Yes.  I think the backends need to handle optimizing this case, esp. considering targets that do not have instructions to produce a {-1,...}/{0,...} bitmask from a comparison but produce a vector of condition codes.  With using vec0 vec1 ? {-1...} : {0,...} for mask = vec0 vec1; we avoid

Re: Vector Comparison patch

2011-08-18 Thread Artem Shinkarov
On Wed, Aug 17, 2011 at 10:52 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 17 Aug 2011, Artem Shinkarov wrote: +For the convenience condition in the vector conditional can be just a +vector of signed integer type. In that case this vector is implicitly +compared with vectors

Re: Vector Comparison patch

2011-08-18 Thread Artem Shinkarov
Richard, I am trying to make sure that when vcond has {-1} and {0} it does not trigger masking. Currently I am doing this: Index: config/i386/i386.c === --- config/i386/i386.c (revision 177665) +++ config/i386/i386.c (working copy)

Re: Vector Comparison patch

2011-08-18 Thread Artem Shinkarov
Hi, I had the problem with passing information about single variable from expand_vec_cond_expr optab into ix86_expand_*_vcond. I looked into it this problem for quite a while and found a solution. Now the question if it could be done better. First of all the problem: If we represent any vector

Re: Vector Comparison patch

2011-08-19 Thread Artem Shinkarov
On Fri, Aug 19, 2011 at 3:54 PM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Aug 19, 2011 at 2:29 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Hi, I had the problem with passing information about single variable from expand_vec_cond_expr optab into ix86_expand_*_vcond

Re: Vector Comparison patch

2011-08-22 Thread Artem Shinkarov
On Mon, Aug 22, 2011 at 12:25 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 22, 2011 at 12:53 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Richard I formalized an approach a little-bit, now it works without target hooks, but some polishing is still required. I

Re: Vector Comparison patch

2011-08-22 Thread Artem Shinkarov
On Mon, Aug 22, 2011 at 4:01 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 22, 2011 at 2:05 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Mon, Aug 22, 2011 at 12:25 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 22, 2011 at 12:53 AM, Artem

Re: Vector Comparison patch

2011-08-22 Thread Artem Shinkarov
On Mon, Aug 22, 2011 at 4:34 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 22, 2011 at 5:21 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Mon, Aug 22, 2011 at 4:01 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 22, 2011 at 2:05 PM, Artem

Re: Vector Comparison patch

2011-08-22 Thread Artem Shinkarov
On Mon, Aug 22, 2011 at 8:50 PM, Uros Bizjak ubiz...@gmail.com wrote: On Mon, Aug 22, 2011 at 5:34 PM, Richard Guenther richard.guent...@gmail.com wrote: In this case it is simple to analyse that a is a comparison, but you cannot embed the operations of a into VEC_COND_EXPR. Sure, but if

Re: Vector Comparison patch

2011-08-23 Thread Artem Shinkarov
On Tue, Aug 23, 2011 at 9:17 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 22, 2011 at 11:11 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: I'll just send you my current version. I'll be a little bit more specific. The problem starts when you try to lower

Re: Vector Comparison patch

2011-08-23 Thread Artem Shinkarov
On Tue, Aug 23, 2011 at 11:08 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 23, 2011 at 11:44 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Tue, Aug 23, 2011 at 9:17 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 22, 2011 at 11:11 PM, Artem

Re: Vector Comparison patch

2011-08-23 Thread Artem Shinkarov
On Tue, Aug 23, 2011 at 11:33 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 23, 2011 at 12:24 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Tue, Aug 23, 2011 at 11:08 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 23, 2011 at 11:44 AM

Re: Vector Comparison patch

2011-08-23 Thread Artem Shinkarov
On Tue, Aug 23, 2011 at 11:56 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 23, 2011 at 12:45 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Tue, Aug 23, 2011 at 11:33 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 23, 2011 at 12:24 PM

Re: Vector Comparison patch

2011-08-23 Thread Artem Shinkarov
On Tue, Aug 23, 2011 at 12:23 PM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 23, 2011 at 1:11 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Tue, Aug 23, 2011 at 11:56 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 23, 2011 at 12:45 PM, Artem

Re: Vector Comparison patch

2011-08-25 Thread Artem Shinkarov
On Thu, Aug 25, 2011 at 8:34 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Aug 25, 2011 at 8:20 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Here is a cleaned-up patch without the hook. Mostly it works in a way we discussed. So I think it is a right time to do

Re: Vector Comparison patch

2011-08-25 Thread Artem Shinkarov
On Thu, Aug 25, 2011 at 11:09 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Aug 25, 2011 at 8:20 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Here is a cleaned-up patch without the hook. Mostly it works in a way we discussed. So I think it is a right time to do

Re: Vector Comparison patch

2011-08-25 Thread Artem Shinkarov
On Thu, Aug 25, 2011 at 2:00 PM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Aug 25, 2011 at 2:45 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: On Thu, Aug 25, 2011 at 12:39 PM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Aug 25, 2011 at 1:07 PM, Artem

Re: Vector Comparison patch

2011-08-26 Thread Artem Shinkarov
Hi Here is a patch with vector comparison only. Comparison is expanded using VEC_COND_EXPR, conversions between the different types inside the VEC_COND_EXPR are happening in optabs.c. The comparison generally works, however, the x86 backend does not recognize vectors of all 1s of type float and

Vector shuffling

2011-08-29 Thread Artem Shinkarov
it on a real hardware in couple of days. Thanks, Artem Shinkarov. Index: gcc/doc/extend.texi === --- gcc/doc/extend.texi (revision 177758) +++ gcc/doc/extend.texi (working copy) @@ -6553,6 +6553,32 @@ invoke undefined behavior at runtime

Re: Vector shuffling

2011-08-30 Thread Artem Shinkarov
On Tue, Aug 30, 2011 at 2:03 PM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 30, 2011 at 4:31 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Hi This is a patch for the explicit vector shuffling we have discussed a long time ago here: http://gcc.gnu.org/ml/gcc

Re: Vector shuffling

2011-08-31 Thread Artem Shinkarov
On Wed, Aug 31, 2011 at 12:51 AM, Chris Lattner clatt...@apple.com wrote: On Aug 30, 2011, at 10:01 AM, Artem Shinkarov wrote: The patch at the moment lacks of some examples, but mainly it works fine for me. It would be nice if i386 gurus could look into the way I am doing the expansion

Re: Vector shuffling

2011-08-31 Thread Artem Shinkarov
On Wed, Aug 31, 2011 at 4:38 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 31 Aug 2011, Artem Shinkarov wrote: 1) Helper function for the pseudo-builtins. In my case the builtin can have 2 or 3 arguments, and I think that I expressed that in a pretty much short way without any

Re: Vector shuffling

2011-09-02 Thread Artem Shinkarov
On Fri, Sep 2, 2011 at 4:41 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Fri, 2 Sep 2011, Artem Shinkarov wrote: +  /* Avoid C_MAYBE_CONST_EXPRs inside VEC_SHUFFLE_EXPR.  */ +  tmp = c_fully_fold (v0, false, maybe_const); +  v0 = save_expr (tmp); +  wrap = maybe_const; I suppose

Re: Vector Comparison patch

2011-09-06 Thread Artem Shinkarov
Here is a new version of the patch which considers the changes from 2011-09-02 Richard Guenther ChangeLog 20011-09-06 Artjoms Sinkarovs artyom.shinkar...@gmail.com gcc/ * fold-const.c (constant_boolean_node): Adjust the meaning of boolean for vector types: true = {-1,..},

Re: Vector Comparison patch

2011-09-07 Thread Artem Shinkarov
On Tue, Sep 6, 2011 at 3:56 PM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Sep 6, 2011 at 4:50 PM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Here is a new version of the patch which considers the changes from 2011-09-02  Richard Guenther ChangeLog 20011-09-06