2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr53397-1.c
blob63650366ca2186866f9a999946c4be4c0719d3e1
1 /* Prefetching when the step is loop invariant. */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target sse2 } */
4 /* { dg-options "-O3 -msse2 -fprefetch-loop-arrays -fdump-tree-aprefetch-details --param min-insn-to-prefetch-ratio=3 --param simultaneous-prefetches=10 -fdump-tree-aprefetch-details" } */
7 double data[16384];
8 void prefetch_when_non_constant_step_is_invariant(int step, int n)
10 int a;
11 int b;
12 for (a = 1; a < step; a++) {
13 for (b = 0; b < n; b += 2 * step) {
15 int i = 2*(b + a);
16 int j = 2*(b + a + step);
19 data[j] = data[i];
20 data[j+1] = data[i+1];
25 /* { dg-final { scan-tree-dump "Issued prefetch" "aprefetch" } } */
26 /* { dg-final { scan-assembler "prefetcht0" } } */
28 /* { dg-final { cleanup-tree-dump "aprefetch" } } */