(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
vect-89.c
       1  /* Disabling epilogues until we find a better way to deal with scans.  */
       2  /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
       3  /* { dg-require-effective-target vect_int } */
       4  
       5  #include <stdarg.h>
       6  #include "tree-vect.h"
       7  
       8  #if VECTOR_BITS > 256
       9  #define N (VECTOR_BITS * 2 / 32)
      10  #else
      11  #define N 16
      12  #endif
      13  
      14  struct tmp_struct
      15  {
      16    int x;
      17    int y[N];
      18  };
      19  	 
      20  __attribute__ ((noinline))
      21  int main1 ()
      22  {  
      23    int i, *q;
      24    struct tmp_struct tmp, *p;
      25  
      26    p = &tmp;
      27    q = p->y;
      28  
      29    for (i = 0; i < N; i++)
      30      {
      31        *q++ = 5;
      32      }
      33  
      34    /* check results: */  
      35    for (i = 0; i < N; i++)
      36      {
      37        if (p->y[i] != 5)
      38          {
      39            abort ();
      40          }
      41      }
      42  
      43    return 0;
      44  }
      45  
      46  int main (void)
      47  { 
      48    check_vect ();
      49    
      50    return main1 ();
      51  } 
      52  
      53  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
      54  /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */
      55  /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */