Re: [PATCH] [vectorizer] Fixing a bug in tree-vect-patterns.c in GCC vectorizer.

2013-09-16 Thread Richard Biener
On Fri, Sep 13, 2013 at 8:06 PM, Cong Hou wrote: > A new test case is added to testsuite/gcc.dg/vect, which will fail > without this patch and pass with it. Bootstrap also get passed. No > additional test failure is introduced. > > The new test case includes a dot product on two arrays with short

Re: [PATCH] [vectorizer] Fixing a bug in tree-vect-patterns.c in GCC vectorizer.

2013-09-13 Thread Cong Hou
A new test case is added to testsuite/gcc.dg/vect, which will fail without this patch and pass with it. Bootstrap also get passed. No additional test failure is introduced. The new test case includes a dot product on two arrays with short and int types. The loop will still be vectorized (using pun

Re: [PATCH] [vectorizer] Fixing a bug in tree-vect-patterns.c in GCC vectorizer.

2013-09-12 Thread Richard Biener
On Thu, Sep 12, 2013 at 3:16 AM, Cong Hou wrote: > Hi > > There is a bug in the function vect_recog_dot_prod_pattern() in > tree-vect-patterns.c. This function checks if a loop is of dot > production pattern. Specifically, according to the comment of this > function: > > /* > Try to find the foll

Re: [PATCH] [vectorizer] Fixing a bug in tree-vect-patterns.c in GCC vectorizer.

2013-09-11 Thread Xinliang David Li
Can you add a test case to the regression suite? When the type of arguments are unsigned short/unsigned int, GCC does not vectorize the loop anymore -- this is worth a separate bug to track. punpcklwd instruction can be used to do zero extension of the short type. David On Wed, Sep 11, 2013 at 6

[PATCH] [vectorizer] Fixing a bug in tree-vect-patterns.c in GCC vectorizer.

2013-09-11 Thread Cong Hou
Hi There is a bug in the function vect_recog_dot_prod_pattern() in tree-vect-patterns.c. This function checks if a loop is of dot production pattern. Specifically, according to the comment of this function: /* Try to find the following pattern: type x_t, y_t; TYPE1 prod; TYPE2 su