(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
pr53397-1.c
       1  /* Prefetching when the step is loop invariant.  */
       2  /* { dg-do compile } */
       3  /* { 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" } */
       4  
       5  
       6  double data[16384];
       7  void prefetch_when_non_constant_step_is_invariant(int step, int n)
       8  {
       9       int a;
      10       int b;
      11       for (a = 1; a < step; a++) {
      12          for (b = 0; b < n; b += 2 * step) {
      13  
      14            int i = 2*(b + a);
      15            int j = 2*(b + a + step);
      16  
      17  
      18            data[j]   = data[i];
      19            data[j+1] = data[i+1];
      20          }
      21       }
      22  }
      23  
      24  /* { dg-final { scan-tree-dump "Issued prefetch" "aprefetch" } } */
      25  /* { dg-final { scan-assembler "prefetcht0" } } */
      26