Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2014-06-24 Thread Richard Biener
On Mon, 23 Jun 2014, Cong Hou wrote: It has been 8 months since this patch is posted. I have addressed all comments to this patch. The SAD pattern is very useful for some multimedia algorithms like ffmpeg. This patch will greatly improve the performance of such algorithms. Could you please

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2014-06-24 Thread Richard Biener
On Tue, Dec 3, 2013 at 2:06 AM, Cong Hou co...@google.com wrote: Hi Richard Could you please take a look at this patch and see if it is ready for the trunk? The patch is pasted as a text file here again. (found it) The patch is ok for trunk. (please consider re-testing before you commit)

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2014-06-24 Thread Cong Hou
OK. Thank you very much for your review, Richard! thanks, Cong On Tue, Jun 24, 2014 at 4:19 AM, Richard Biener richard.guent...@gmail.com wrote: On Tue, Dec 3, 2013 at 2:06 AM, Cong Hou co...@google.com wrote: Hi Richard Could you please take a look at this patch and see if it is ready for

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2014-06-23 Thread Cong Hou
It has been 8 months since this patch is posted. I have addressed all comments to this patch. The SAD pattern is very useful for some multimedia algorithms like ffmpeg. This patch will greatly improve the performance of such algorithms. Could you please have a look again and check if it is OK for

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-12-17 Thread Cong Hou
Ping? thanks, Cong On Mon, Dec 2, 2013 at 5:06 PM, Cong Hou co...@google.com wrote: Hi Richard Could you please take a look at this patch and see if it is ready for the trunk? The patch is pasted as a text file here again. Thank you very much! Cong On Mon, Nov 11, 2013 at 11:25 AM,

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-12-02 Thread Cong Hou
Hi Richard Could you please take a look at this patch and see if it is ready for the trunk? The patch is pasted as a text file here again. Thank you very much! Cong On Mon, Nov 11, 2013 at 11:25 AM, Cong Hou co...@google.com wrote: Hi James Sorry for the late reply. On Fri, Nov 8, 2013

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-20 Thread Cong Hou
Ping... thanks, Cong On Fri, Nov 15, 2013 at 9:52 AM, Cong Hou co...@google.com wrote: Any more comments? thanks, Cong On Wed, Nov 13, 2013 at 6:06 PM, Cong Hou co...@google.com wrote: Ping? thanks, Cong On Mon, Nov 11, 2013 at 11:25 AM, Cong Hou co...@google.com wrote: Hi

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-15 Thread Cong Hou
Any more comments? thanks, Cong On Wed, Nov 13, 2013 at 6:06 PM, Cong Hou co...@google.com wrote: Ping? thanks, Cong On Mon, Nov 11, 2013 at 11:25 AM, Cong Hou co...@google.com wrote: Hi James Sorry for the late reply. On Fri, Nov 8, 2013 at 2:55 AM, James Greenhalgh

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-13 Thread Cong Hou
Ping? thanks, Cong On Mon, Nov 11, 2013 at 11:25 AM, Cong Hou co...@google.com wrote: Hi James Sorry for the late reply. On Fri, Nov 8, 2013 at 2:55 AM, James Greenhalgh james.greenha...@arm.com wrote: On Tue, Nov 5, 2013 at 9:58 AM, Cong Hou co...@google.com wrote: Thank you for

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-11 Thread Cong Hou
Hi James Sorry for the late reply. On Fri, Nov 8, 2013 at 2:55 AM, James Greenhalgh james.greenha...@arm.com wrote: On Tue, Nov 5, 2013 at 9:58 AM, Cong Hou co...@google.com wrote: Thank you for your detailed explanation. Once GCC detects a reduction operation, it will automatically

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-08 Thread James Greenhalgh
On Tue, Nov 5, 2013 at 9:58 AM, Cong Hou co...@google.com wrote: Thank you for your detailed explanation. Once GCC detects a reduction operation, it will automatically accumulate all elements in the vector after the loop. In the loop the reduction variable is always a vector whose

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-07 Thread Cong Hou
Now is this patch OK for the trunk? Thank you! thanks, Cong On Tue, Nov 5, 2013 at 9:58 AM, Cong Hou co...@google.com wrote: Thank you for your detailed explanation. Once GCC detects a reduction operation, it will automatically accumulate all elements in the vector after the loop. In the

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-05 Thread James Greenhalgh
On Mon, Nov 04, 2013 at 06:30:55PM +, Cong Hou wrote: On Mon, Nov 4, 2013 at 2:06 AM, James Greenhalgh james.greenha...@arm.com wrote: On Fri, Nov 01, 2013 at 04:48:53PM +, Cong Hou wrote: diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 2a5a2e1..8f5d39a 100644 ---

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-05 Thread Cong Hou
Thank you for your detailed explanation. Once GCC detects a reduction operation, it will automatically accumulate all elements in the vector after the loop. In the loop the reduction variable is always a vector whose elements are reductions of corresponding values from other vectors. Therefore in

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-04 Thread James Greenhalgh
On Fri, Nov 01, 2013 at 04:48:53PM +, Cong Hou wrote: diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 2a5a2e1..8f5d39a 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -4705,6 +4705,16 @@ wider mode, is computed and added to operand 3. Operand 3 is of a mode equal or wider

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-04 Thread Cong Hou
On Mon, Nov 4, 2013 at 2:06 AM, James Greenhalgh james.greenha...@arm.com wrote: On Fri, Nov 01, 2013 at 04:48:53PM +, Cong Hou wrote: diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 2a5a2e1..8f5d39a 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -4705,6 +4705,16 @@ wider

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-01 Thread Uros Bizjak
On Fri, Nov 1, 2013 at 3:03 AM, Cong Hou co...@google.com wrote: According to your comments, I made the following modifications to this patch: 1. Now SAD pattern does not require the first and second operands to be unsigned. And two versions (signed/unsigned) of the SAD optabs are defined:

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-11-01 Thread James Greenhalgh
On Fri, Nov 01, 2013 at 02:03:52AM +, Cong Hou wrote: 3. Add the document for SAD_EXPR. I think this patch should also document the new Standard Names usad and ssad in doc/md.texi? Your Changelog is missing the change to doc/generic.texi. Thanks, James

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-10-31 Thread Uros Bizjak
Hello! SAD (Sum of Absolute Differences) is a common and important algorithm in image processing and other areas. SSE2 even introduced a new instruction PSADBW for it. A SAD loop can be greatly accelerated by this instruction after being vectorized. This patch introduced a new operation

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-10-30 Thread Richard Biener
On Tue, 29 Oct 2013, Cong Hou wrote: Hi SAD (Sum of Absolute Differences) is a common and important algorithm in image processing and other areas. SSE2 even introduced a new instruction PSADBW for it. A SAD loop can be greatly accelerated by this instruction after being vectorized. This

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-10-30 Thread Cong Hou
On Wed, Oct 30, 2013 at 4:27 AM, Richard Biener rguent...@suse.de wrote: On Tue, 29 Oct 2013, Cong Hou wrote: Hi SAD (Sum of Absolute Differences) is a common and important algorithm in image processing and other areas. SSE2 even introduced a new instruction PSADBW for it. A SAD loop can be

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-10-30 Thread Cong Hou
On Tue, Oct 29, 2013 at 4:49 PM, Ramana Radhakrishnan ramana@googlemail.com wrote: Cong, Please don't do the following. +++ b/gcc/testsuite/gcc.dg/vect/ vect-reduc-sad.c @@ -0,0 +1,54 @@ +/* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */ you are adding a

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-10-30 Thread Ramana Radhakrishnan
On Thu, Oct 31, 2013 at 12:29 AM, Cong Hou co...@google.com wrote: On Tue, Oct 29, 2013 at 4:49 PM, Ramana Radhakrishnan ramana@googlemail.com wrote: Cong, Please don't do the following. +++ b/gcc/testsuite/gcc.dg/vect/ vect-reduc-sad.c @@ -0,0 +1,54 @@ +/* {

[PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-10-29 Thread Cong Hou
Hi SAD (Sum of Absolute Differences) is a common and important algorithm in image processing and other areas. SSE2 even introduced a new instruction PSADBW for it. A SAD loop can be greatly accelerated by this instruction after being vectorized. This patch introduced a new operation SAD_EXPR and

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2013-10-29 Thread Ramana Radhakrishnan
Cong, Please don't do the following. +++ b/gcc/testsuite/gcc.dg/vect/ vect-reduc-sad.c @@ -0,0 +1,54 @@ +/* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */ you are adding a test to gcc.dg/vect - It's a common directory containing tests that need to run on multiple