ranjith kumar wrote:
1) gcc manuals says -fprefetch-loop-arrays option
inserts prefetch instructions automatically.
Where can I get an example .c program for which gcc
inserts prefetching instruction.
2) Similarly to the autovectorization.
Thanks in advance.
You might specify what target you are interested in. As x86-64 targets
do better with hardware prefetch than software prefetch, for the simple
cases, I don't find the latter so interesting.
There are test cases for -ftree-vectorize in the testsuite, both in the
language parts and the tree-lang testsuite. gfortran-4.3 does a
consistently good job on vectorization of the simple cases. gcc
vectorizes effectively several of the gfortran library functions,
including matmul.