(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
sms-6.c
       1  /* { dg-do run } */
       2  /* { dg-require-effective-target size32plus } */
       3  /* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1" } */
       4  /* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves -fno-sched-pressure" { target powerpc*-*-* } } */
       5  
       6  extern void abort (void);
       7  
       8  __attribute__ ((noinline))
       9  void foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
      10  {
      11     int i;
      12     for(i = 0; i < 100; i+=4)
      13       {
      14         a[i] = b[i] * c[i];
      15         a[i+1] = b[i+1] * c[i+1];
      16         a[i+2] = b[i+2] * c[i+2];
      17         a[i+3] = b[i+3] * c[i+3];
      18       }
      19  }   
      20  
      21  int a[100], b[100], c[100];
      22  
      23  int main()
      24  {
      25    int i;
      26    int res;
      27  
      28    for(i = 0; i < 100; i++)
      29      {
      30        b[i] = c[i] = i;
      31      }  
      32    foo(a, b, c);
      33    
      34    res = 0;  
      35    for(i = 0; i < 100; i++)
      36      {
      37        res += a[i];
      38      }
      39    if(res != 328350)
      40      abort();
      41    
      42    return 0;        
      43  }