(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
gen-vect-28.c
       1  /* { dg-do run { target vect_cmdline_needed } } */
       2  /* { dg-options "-O2 -fno-tree-loop-distribute-patterns -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
       3  /* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
       4  
       5  #include <stdlib.h>
       6  
       7  #define N 128
       8  #define OFF 3
       9  
      10  /* unaligned store.  */
      11  
      12  int main_1 (int off)
      13  {
      14    int i;
      15    char ia[N+OFF];
      16  
      17    for (i = 0; i < N; i++)
      18      {
      19        ia[i+off] = 5;
      20      }
      21  
      22    /* check results:  */
      23    for (i = 0; i < N; i++)
      24      {
      25        if (ia[i+off] != 5)
      26          abort ();
      27      }
      28  
      29    return 0;
      30  }
      31  
      32  static volatile int off = 1;
      33  
      34  int main (void)
      35  {
      36    return main_1 (off);
      37  }
      38  
      39  
      40  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { avr-*-* pru-*-* } } } } } */
      41  /* IBM Z does not require special alignment for vectorization.  */
      42  /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { ! { avr-*-* pru-*-* s390*-*-* } } } } } */
      43  /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { ! { avr-*-* pru-*-* s390*-*-* } } } } } */