Re: [PATCH] Fix PR60505

2014-04-01 Thread Richard Biener
On Fri, 28 Mar 2014, Cong Hou wrote: Ping? Ok. Thanks, Richard. thanks, Cong On Wed, Mar 19, 2014 at 11:39 AM, Cong Hou co...@google.com wrote: On Tue, Mar 18, 2014 at 4:43 AM, Richard Biener rguent...@suse.de wrote: On Mon, 17 Mar 2014, Cong Hou wrote: On Mon, Mar 17,

Re: [PATCH] Fix PR60505

2014-03-28 Thread Cong Hou
Ping? thanks, Cong On Wed, Mar 19, 2014 at 11:39 AM, Cong Hou co...@google.com wrote: On Tue, Mar 18, 2014 at 4:43 AM, Richard Biener rguent...@suse.de wrote: On Mon, 17 Mar 2014, Cong Hou wrote: On Mon, Mar 17, 2014 at 6:44 AM, Richard Biener rguent...@suse.de wrote: On Fri, 14 Mar

Re: [PATCH] Fix PR60505

2014-03-19 Thread Cong Hou
On Tue, Mar 18, 2014 at 4:43 AM, Richard Biener rguent...@suse.de wrote: On Mon, 17 Mar 2014, Cong Hou wrote: On Mon, Mar 17, 2014 at 6:44 AM, Richard Biener rguent...@suse.de wrote: On Fri, 14 Mar 2014, Cong Hou wrote: On Fri, Mar 14, 2014 at 12:58 AM, Richard Biener

Re: [PATCH] Fix PR60505

2014-03-18 Thread Richard Biener
On Mon, 17 Mar 2014, Cong Hou wrote: On Mon, Mar 17, 2014 at 6:44 AM, Richard Biener rguent...@suse.de wrote: On Fri, 14 Mar 2014, Cong Hou wrote: On Fri, Mar 14, 2014 at 12:58 AM, Richard Biener rguent...@suse.de wrote: On Fri, 14 Mar 2014, Jakub Jelinek wrote: On Fri, Mar 14,

Re: [PATCH] Fix PR60505

2014-03-17 Thread Richard Biener
On Fri, 14 Mar 2014, Cong Hou wrote: On Fri, Mar 14, 2014 at 12:58 AM, Richard Biener rguent...@suse.de wrote: On Fri, 14 Mar 2014, Jakub Jelinek wrote: On Fri, Mar 14, 2014 at 08:52:07AM +0100, Richard Biener wrote: Consider this fact and if there are alias checks, we can safely

Re: [PATCH] Fix PR60505

2014-03-17 Thread Jakub Jelinek
On Mon, Mar 17, 2014 at 02:44:29PM +0100, Richard Biener wrote: You mean exactly in the case where the profitability check ensures that n % vf == 0? Thus effectively if n == maximum trip count? That's quite a special case, no? Indeed it is. But I guess that is pretty much the only case where

Re: [PATCH] Fix PR60505

2014-03-17 Thread Cong Hou
On Mon, Mar 17, 2014 at 6:44 AM, Richard Biener rguent...@suse.de wrote: On Fri, 14 Mar 2014, Cong Hou wrote: On Fri, Mar 14, 2014 at 12:58 AM, Richard Biener rguent...@suse.de wrote: On Fri, 14 Mar 2014, Jakub Jelinek wrote: On Fri, Mar 14, 2014 at 08:52:07AM +0100, Richard Biener wrote:

Re: [PATCH] Fix PR60505

2014-03-14 Thread Richard Biener
On Thu, 13 Mar 2014, Cong Hou wrote: On Thu, Mar 13, 2014 at 2:27 AM, Richard Biener rguent...@suse.de wrote: On Wed, 12 Mar 2014, Cong Hou wrote: Thank you for pointing it out. I didn't realized that alias analysis has influences on this issue. The current problem is that the

Re: [PATCH] Fix PR60505

2014-03-14 Thread Jakub Jelinek
On Fri, Mar 14, 2014 at 08:52:07AM +0100, Richard Biener wrote: Consider this fact and if there are alias checks, we can safely remove the epilogue if the maximum trip count of the loop is less than or equal to the calculated threshold. You have to consider n % vf != 0, so an argument on

Re: [PATCH] Fix PR60505

2014-03-14 Thread Richard Biener
On Fri, 14 Mar 2014, Jakub Jelinek wrote: On Fri, Mar 14, 2014 at 08:52:07AM +0100, Richard Biener wrote: Consider this fact and if there are alias checks, we can safely remove the epilogue if the maximum trip count of the loop is less than or equal to the calculated threshold. You

Re: [PATCH] Fix PR60505

2014-03-14 Thread Cong Hou
On Fri, Mar 14, 2014 at 12:58 AM, Richard Biener rguent...@suse.de wrote: On Fri, 14 Mar 2014, Jakub Jelinek wrote: On Fri, Mar 14, 2014 at 08:52:07AM +0100, Richard Biener wrote: Consider this fact and if there are alias checks, we can safely remove the epilogue if the maximum trip count

Re: [PATCH] Fix PR60505

2014-03-13 Thread Richard Biener
On Wed, 12 Mar 2014, Cong Hou wrote: Thank you for pointing it out. I didn't realized that alias analysis has influences on this issue. The current problem is that the epilogue may be unnecessary if the loop bound cannot be larger than the number of iterations of the vectorized loop

Re: [PATCH] Fix PR60505

2014-03-13 Thread Cong Hou
On Thu, Mar 13, 2014 at 2:27 AM, Richard Biener rguent...@suse.de wrote: On Wed, 12 Mar 2014, Cong Hou wrote: Thank you for pointing it out. I didn't realized that alias analysis has influences on this issue. The current problem is that the epilogue may be unnecessary if the loop bound

Re: [PATCH] Fix PR60505

2014-03-12 Thread Jakub Jelinek
On Tue, Mar 11, 2014 at 04:16:13PM -0700, Cong Hou wrote: This patch is fixing PR60505 in which the vectorizer may produce unnecessary epilogues. Bootstrapped and tested on a x86_64 machine. OK for trunk? That looks wrong. Consider the case where the loop isn't versioned, if you disable

Re: [PATCH] Fix PR60505

2014-03-12 Thread Richard Biener
On Wed, 12 Mar 2014, Jakub Jelinek wrote: On Tue, Mar 11, 2014 at 04:16:13PM -0700, Cong Hou wrote: This patch is fixing PR60505 in which the vectorizer may produce unnecessary epilogues. Bootstrapped and tested on a x86_64 machine. OK for trunk? That looks wrong. Consider the

Re: [PATCH] Fix PR60505

2014-03-12 Thread Cong Hou
Thank you for pointing it out. I didn't realized that alias analysis has influences on this issue. The current problem is that the epilogue may be unnecessary if the loop bound cannot be larger than the number of iterations of the vectorized loop multiplied by VF when the vectorized loop is

[PATCH] Fix PR60505

2014-03-11 Thread Cong Hou
This patch is fixing PR60505 in which the vectorizer may produce unnecessary epilogues. Bootstrapped and tested on a x86_64 machine. OK for trunk? thanks, Cong diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e1d8666..f98e628 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@