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  #define N 128 
       9  
      10  int a[N], b[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
      11  
      12  /* Vectorization of reduction. Loop-aware SLP is not possible, because of 
      13     different arrays.  */
      14  
      15  __attribute__ ((noinline))
      16  int main1 (int n, int res0, int res1)
      17  {
      18    int i;
      19    int sum0 = 0, sum1 = 0;
      20  
      21    for (i = 0; i < n; i++) {
      22      sum1 += a[2*i];
      23      sum0 += b[2*i];
      24    }
      25  
      26    /* Check results:  */
      27    if (sum0 != res0
      28        || sum1 != res1)
      29      abort ();
      30  
      31    return 0;
      32  }
      33  
      34  int main (void)
      35  {
      36    int i;
      37  
      38    check_vect ();
      39  
      40    for (i = 0; i < N; i++)
      41      a[i] = b[i] = i;
      42  
      43    main1 (N/2, 4032, 4032);
      44    return 0;
      45  }
      46  
      47  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_int_add || { ! { vect_unpack || vect_strided2 } } } } } } */
      48  /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */
      49  /* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 1 "vect" { target { ! vect_no_int_add } } } } */
      50