(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
vect-96.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  /* { dg-add-options double_vectors } */
       5  
       6  #include <stdarg.h>
       7  #include "tree-vect.h"
       8  
       9  #if VECTOR_BITS > 256
      10  #define N (VECTOR_BITS * 2 / 32)
      11  #else
      12  #define N 16
      13  #endif
      14  
      15  struct tmp
      16  {
      17       int x;
      18       int ia[N];
      19  };
      20  
      21  __attribute__ ((noinline))
      22  int main1 (int off)
      23  {
      24    struct tmp sb[N];
      25    struct tmp *pp = &sb[off];
      26    int i, ib[N];
      27  
      28    for (i = 0; i < N; i++)
      29        pp->ia[i] = ib[i];
      30  
      31    /* check results: */  
      32    for (i = 0; i < N; i++)
      33      {
      34         if (pp->ia[i] != ib[i])
      35           abort();
      36      }
      37  
      38    return 0;
      39  }
      40  
      41  int main (void)
      42  { 
      43    check_vect ();
      44  
      45    return main1 (8);
      46  }
      47  
      48  /* The store is unaligned, the load is aligned. For targets that support unaligned
      49     loads, peel to align the store and generate an unaligned access for the load.
      50     For targets that don't support unaligned loads, version for the store.  */
      51  
      52  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
      53  /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && { ! vect_align_stack_vars } } xfail { ! vect_unaligned_possible } } } } */
      54  /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
      55  /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
      56  /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */