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 16
       9  #define MAX 121
      10  
      11  unsigned int ub[N] = {0,3,6,9,12,15,18,121,24,27,113,33,36,39,42,45};
      12  
      13  /* Vectorization of reduction using loop-aware SLP (with unrolling).  */
      14  
      15  __attribute__ ((noinline))
      16  int main1 (int n)
      17  {
      18    int i;
      19    unsigned int max = 50;
      20  
      21    for (i = 0; i < n; i++) {
      22      max = max < ub[2*i] ? ub[2*i] : max;
      23      max = max < ub[2*i + 1] ? ub[2*i + 1] : max;
      24    }
      25  
      26    /* Check results:  */
      27    if (max != MAX)
      28      abort ();
      29  
      30    return 0;
      31  }
      32  
      33  int main (void)
      34  {
      35    check_vect ();
      36  
      37    main1 (N/2);
      38    return 0;
      39  }
      40  
      41  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
      42  /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */
      43