[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-13 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #14 from Ira Rosen 2011-12-13 16:27:19 UTC --- (In reply to comment #13) > > However, I don't fully understand Richard Guenther's example. Yes his > example requires -fassociative-math to be vectorized, however, my example > would tr

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-12 Thread fb.programming at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #13 from fb.programming at gmail dot com 2011-12-12 14:20:58 UTC --- (In reply to comment #9) > So, you are suggesting to remove the need in flag_associative_math for fp for > cases when a reduction computation is already unrolled by t

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-12 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #12 from Dominique d'Humieres 2011-12-12 12:47:54 UTC --- > > even when the above loops are unrolled. How can the loop L5 be unrolled if > > it > > is only there for a "scalar epilogue"? > > It can't be unrolled, since the alignment

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-12 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #11 from Ira Rosen 2011-12-12 11:27:26 UTC --- Right. We need to check that there is no load permutation.

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-12 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #10 from Richard Guenther 2011-12-12 11:24:22 UTC --- Hmm. But we are vectorizing sum += a[i] sum += a[i+1] the same as sum += a[i+1] sum += a[i] no? Thus you have to check whether the summation occours in "memory order"

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-12 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #9 from Ira Rosen 2011-12-12 11:13:24 UTC --- (In reply to comment #7) > > In some cases it might be necessary but not here: > > sum1+=a; > sum2+=a; > > gives exactly the same result as > > (sum1, sum2) += (a, a); > So, you a

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-12 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #8 from Ira Rosen 2011-12-12 11:03:59 UTC --- (In reply to comment #6) > While investigating pr51597, I have found that vectorized loops in programs as > simple as > > subroutine spmmult(x,b,ad) > implicit none > integer, parameter

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-11 Thread fb.programming at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #7 from fb.programming at gmail dot com 2011-12-11 14:55:13 UTC --- (In reply to comment #5) > > (3) If I change all double's into float's in the code above it seems to > I think you are looking at the scalar epilogue. The number of i

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-11 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #6 from Dominique d'Humieres 2011-12-11 14:14:01 UTC --- > I think you are looking at the scalar epilogue. The number of iterations is > unknown, so we need an epilogue loop for the case that number of iterations is > not a multiple o

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-11 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #5 from Ira Rosen 2011-12-11 13:30:41 UTC --- (In reply to comment #4) > Looks like there has been some great progress in gcc 4.7! > > Still I think it behaves slightly buggy. > > (1) In this case it should work without -funsafe-mat

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-11 Thread fb.programming at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #4 from fb.programming at gmail dot com 2011-12-11 11:52:30 UTC --- Looks like there has been some great progress in gcc 4.7! Still I think it behaves slightly buggy. (1) In this case it should work without -funsafe-math-optimizations

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-11 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #3 from Ira Rosen 2011-12-11 08:48:24 UTC --- It gets vectorized with 4.7. I guess, due to this 4.7 patch http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00620.html.

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-11 Thread fb.programming at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 --- Comment #2 from fb.programming at gmail dot com 2011-12-11 08:33:40 UTC --- (In reply to comment #1) g++-4.6.2 -S -Wall -O3 -ftree-vectorize -ftree-vectorizer-verbose=2 \ -ffast-math -fno-vect-cost-model gives me exactly the same a

[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-10 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499 Ira Rosen changed: What|Removed |Added CC||irar at il dot ibm.com --- Comment #1 from Ir