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