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 load.  */
      12  
      13  int ia[N];
      14  int ib[N+1];
      15  
      16  __attribute__ ((noinline))
      17  int main1 ()
      18  {
      19    int i;
      20  
      21    for (i=0; i <= N; i++)
      22      {
      23        ib[i] = i;
      24      }
      25  
      26    for (i = 1; i <= N; i++)
      27      {
      28        ia[i-1] = ib[i];
      29      }
      30  
      31    /* check results:  */
      32    for (i = 1; i <= N; i++)
      33      {
      34        if (ia[i-1] != ib[i])
      35          abort ();
      36      }
      37  
      38    return 0;
      39  }
      40  
      41  int main (void)
      42  { 
      43    check_vect ();
      44    
      45    return main1 ();
      46  }
      47  
      48  /* The initialization induction loop (with aligned access) is also vectorized.  */
      49  /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
      50  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
      51  /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */
      52  /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */