1  /*  This file is distributed under the University of Illinois Open Source
       2      License. See license.txt for details.  */
       3  
       4  /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
       5  /* { dg-require-effective-target vect_float } */
       6  
       7  #include "tsvc.h"
       8  
       9  real_t s2710(struct args_t * func_args)
      10  {
      11  //    control flow
      12  //    scalar and vector ifs
      13  
      14      int x = *(int*)func_args->arg_info;
      15  
      16      initialise_arrays(__func__);
      17  
      18      for (int nl = 0; nl < iterations/2; nl++) {
      19          for (int i = 0; i < LEN_1D; i++) {
      20              if (a[i] > b[i]) {
      21                  a[i] += b[i] * d[i];
      22                  if (LEN_1D > 10) {
      23                      c[i] += d[i] * d[i];
      24                  } else {
      25                      c[i] = d[i] * e[i] + (real_t)1.;
      26                  }
      27              } else {
      28                  b[i] = a[i] + e[i] * e[i];
      29                  if (x > (real_t)0.) {
      30                      c[i] = a[i] + d[i] * d[i];
      31                  } else {
      32                      c[i] += e[i] * e[i];
      33                  }
      34              }
      35          }
      36          dummy(a, b, c, d, e, aa, bb, cc, 0.);
      37      }
      38  
      39      return calc_checksum(__func__);
      40  }
      41  
      42  int main (int argc, char **argv)
      43  {
      44    int n1 = 1;
      45    int n3 = 1;
      46    int* ip;
      47    real_t s1,s2;
      48    init(&ip, &s1, &s2);
      49  
      50    run(&s2710, "s2710", &s1);
      51  
      52    return 0;
      53  }
      54  
      55  /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */