(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
slp-25.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 bind_pic_locally } */
       5  
       6  #include <stdarg.h>
       7  #include "tree-vect.h"
       8  
       9  #define N 128
      10  
      11  /* Unaligned stores.  */
      12  
      13  int ia[N+2];
      14  short sa[N+2];
      15  
      16  int main1 (int n)
      17  {
      18    int i;
      19  
      20    for (i = 1; i <= N/2; i++)
      21      {
      22        ia[2*i] = 25;
      23        ia[2*i + 1] = 5;
      24      }
      25  
      26    /* check results:  */
      27    for (i = 1; i <= N/2; i++)
      28      {
      29        if (ia[2*i] != 25
      30            || ia[2*i + 1] != 5)
      31          abort ();
      32      }
      33  
      34    for (i = 1; i <= n/2; i++)
      35      {
      36        sa[2*i] = 25;
      37        sa[2*i + 1] = 5;
      38      }
      39  
      40    /* check results:  */
      41    for (i = 1; i <= n/2; i++)
      42      {
      43        if (sa[2*i] != 25
      44            || sa[2*i + 1] != 5)
      45          abort ();
      46      }
      47  
      48  
      49    return 0;
      50  }
      51  
      52  int main (void)
      53  { 
      54  
      55    check_vect ();
      56    
      57    return main1 (N);
      58  }
      59  
      60  /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect"  } } */
      61  /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
      62  /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { ! vect_unaligned_possible } || { ! vect_natural_alignment } } } } } */