(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
tsvc/
vect-tsvc-s13110.c
       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 s13110(struct args_t * func_args)
      10  {
      11  //    reductions
      12  //    if to max with index reductio 2 dimensions
      13  
      14      initialise_arrays(__func__);
      15  
      16      int xindex, yindex;
      17      real_t max, chksum;
      18      for (int nl = 0; nl < 100*(iterations/(LEN_2D)); nl++) {
      19          max = aa[(0)][0];
      20          xindex = 0;
      21          yindex = 0;
      22          for (int i = 0; i < LEN_2D; i++) {
      23              for (int j = 0; j < LEN_2D; j++) {
      24                  if (aa[i][j] > max) {
      25                      max = aa[i][j];
      26                      xindex = i;
      27                      yindex = j;
      28                  }
      29              }
      30          }
      31          chksum = max + (real_t) xindex + (real_t) yindex;
      32          dummy(a, b, c, d, e, aa, bb, cc, chksum);
      33      }
      34  
      35      return max + xindex+1 + yindex+1;
      36  }
      37  
      38  int main (int argc, char **argv)
      39  {
      40    int n1 = 1;
      41    int n3 = 1;
      42    int* ip;
      43    real_t s1,s2;
      44    init(&ip, &s1, &s2);
      45  
      46    run(&s13110, "s13110", NULL);
      47  
      48    return 0;
      49  }
      50  
      51  /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */