Re: Fix PR48052: loop not vectorized if index is "unsigned int"

2015-06-01 Thread Bin.Cheng
On Mon, Jun 1, 2015 at 4:00 PM, Richard Biener wrote: > On Sat, May 30, 2015 at 7:47 AM, Jeff Law wrote: >> On 05/19/2015 10:12 AM, Aditya K wrote: >>> >>> w.r.t. the PR48052, here is the patch which finds out if scev would wrap >>> or not. >>> The patch symbolically evaluates if valid_niter>= lo

Re: Fix PR48052: loop not vectorized if index is "unsigned int"

2015-06-01 Thread Richard Biener
On Sat, May 30, 2015 at 7:47 AM, Jeff Law wrote: > On 05/19/2015 10:12 AM, Aditya K wrote: >> >> w.r.t. the PR48052, here is the patch which finds out if scev would wrap >> or not. >> The patch symbolically evaluates if valid_niter>= loop->nb_iterations is >> true. In that case the scev would not

Re: Fix PR48052: loop not vectorized if index is "unsigned int"

2015-05-29 Thread Jeff Law
On 05/19/2015 10:12 AM, Aditya K wrote: w.r.t. the PR48052, here is the patch which finds out if scev would wrap or not. The patch symbolically evaluates if valid_niter>= loop->nb_iterations is true. In that case the scev would not wrap (??). Currently, we only look for two special 'patterns', w

RE: Fix PR48052: loop not vectorized if index is "unsigned int"

2015-05-21 Thread Aditya K
I tested this patch and it passes bootstrap and no extra failures. Thanks -Aditya Symbolically evaluate conditionals, and subtraction when additional constraints are provided. Adding this evaluation mechanism helps vectorize some loops on 64bit machines because on 64bit, a typecast appears w

Re: Fix PR48052: loop not vectorized if index is "unsigned int"

2015-05-19 Thread Bin.Cheng
On Wed, May 6, 2015 at 7:02 PM, Richard Biener wrote: > On Mon, May 4, 2015 at 9:47 PM, Abderrazek Zaafrani > wrote: >> This is an old thread and we are still running into similar issues: >> Code is not being vectorized on 64-bit target due to scev not being >> able to optimally analyze overflow

Re: Fix PR48052: loop not vectorized if index is "unsigned int"

2015-05-07 Thread Abderrazek Zaafrani
Richard, Agree that the code is handling a very special case but this special case is common enough and is limiting the vectorizer in a significant way. The special case is: loops with unsigned index, non-constant start value, and step 1. We have a code for a matrix multiply – loops blocked by han

Re: Fix PR48052: loop not vectorized if index is "unsigned int"

2015-05-06 Thread Richard Biener
On Mon, May 4, 2015 at 9:47 PM, Abderrazek Zaafrani wrote: > This is an old thread and we are still running into similar issues: > Code is not being vectorized on 64-bit target due to scev not being > able to optimally analyze overflow condition. > > While the original test case shown here seems t