Hello! Add --param min-insn-to-prefetch-ratio=0 to avoid "Not prefetching -- instruction to prefetch ratio (6) too small" aprefetch pass rejection.
2011-05-05 Uros Bizjak <ubiz...@gmail.com> * gcc.target/i386/opt-1.c: Add --param min-insn-to-prefetch -ratio=0 to dg-options. * gcc.target/i386/opt-1.c: Ditto. Tested on x86_64-pc-linux-gnu {,-m32} AVX target, committed to mainline SVN. Uros.
Index: gcc.target/i386/opt-2.c =================================================================== --- gcc.target/i386/opt-2.c (revision 173416) +++ gcc.target/i386/opt-2.c (working copy) @@ -1,7 +1,7 @@ /* Test the attribute((optimize)) really works. Do this test by checking whether we vectorize a simple loop. */ /* { dg-do compile } */ -/* { dg-options "-O1 -msse2 -mfpmath=sse -march=k8" } */ +/* { dg-options "-O1 -msse2 -mfpmath=sse -march=k8 --param min-insn-to-prefetch-ratio=0" } */ /* { dg-final { scan-assembler "prefetcht0" } } */ /* { dg-final { scan-assembler "addps" } } */ /* { dg-final { scan-assembler "subss" } } */ Index: gcc.target/i386/opt-1.c =================================================================== --- gcc.target/i386/opt-1.c (revision 173416) +++ gcc.target/i386/opt-1.c (working copy) @@ -1,7 +1,7 @@ /* Test the attribute((optimize)) really works. Do this test by checking whether we vectorize a simple loop. */ /* { dg-do compile } */ -/* { dg-options "-O1 -msse2 -mfpmath=sse -march=k8" } */ +/* { dg-options "-O1 -msse2 -mfpmath=sse -march=k8 --param min-insn-to-prefetch-ratio=0" } */ /* { dg-final { scan-assembler "prefetcht0" } } */ /* { dg-final { scan-assembler "addps" } } */ /* { dg-final { scan-assembler "subss" } } */