(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
vect-98.c
       1  /* { dg-require-effective-target vect_int } */
       2  
       3  #include <stdarg.h>
       4  #include "tree-vect.h"
       5  
       6  #define M 8
       7  #define N 4
       8  #define DOT4( a, b )  ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] )
       9  
      10  __attribute__ ((noinline))
      11  int main1 (int ia[][N])
      12  {
      13    int i, j;
      14    int ib[N] = {0,3,6,9};
      15    int ic[M][M];
      16  
      17    for (i = 0; i < M; i++)
      18      {
      19  	ic[0][i] = DOT4 (ia[i], ib);
      20      }
      21  
      22    /* check results: */  
      23    for (i = 0; i < M; i++)
      24      {
      25         if (ic[0][i] != DOT4 (ia[i], ib))
      26             abort();
      27      }
      28  
      29    return 0;
      30  }
      31  
      32  int main (void)
      33  { 
      34    int ia[M][N] = {{1,2,3,4},{2,3,5,7},{2,4,6,8},{22,43,55,77},
      35  		  {13,17,19,23},{29,31,37,41},{3,7,2,1},{4,9,8,3}};
      36  
      37    check_vect ();
      38  
      39    return main1 (ia);
      40  }
      41  
      42  /* Needs interleaving support.  */
      43  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided4 } } } */
      44  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { xfail  vect_strided4 } } } */