This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc's autovectorizer tests


Hello!

Here are some test sources to exercise gcc's autovectorization feature. These sources are in fact demonstration code to show the abilities of VectorC:

http://www.codeplay.com/vectorc/feat-vec2.html

I have tried to compile test1.c - 'simple source' , test2.c - 'medium source' and test3.c - 'complex source' with current mainline gcc:
gcc version 4.0.0 20050209 (experimental)
with compile flags:
-O2 -msse2 -mfpmath=sse -ftree-vectorize -fdump-tree-vect-stats -funroll-all-loops


gcc was able to vectorize only test1.c, 'simple source' to:

.L2:
       leal    0(,%edx,4), %eax
       addl    $4, %edx
       movaps  c(%eax), %xmm0
       cmpl    $1000, %edx
       addps   b(%eax), %xmm0
       movaps  %xmm0, a(%eax)
       jne     .L2

Other tests were not vectorized:

test2.c:9: note: not vectorized: unhandled data ref: D.1452_8 = b[i_5].x
test2.c:6: note: vectorized 0 loops in function.

and

test3.c:8: note: not vectorized: unhandled data ref: D.1455_10 = b[i_35].R
test3.c:6: note: vectorized 0 loops in function.

Here are some other benchmarks to play with:
http://www.codeplay.com/vectorc/bench.html

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]