(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
vect-ifcvt-11.c
       1  /* { dg-require-effective-target vect_condition } */
       2  /* { dg-require-effective-target vect_int } */
       3  
       4  #include "tree-vect.h"
       5  
       6  #define N 16
       7  
       8  extern void abort (void);
       9  
      10  int A[N] = {36, 39, 42, 45, 43, 32, 21, 12, 23, 34, 45, 56, 67, 78, 81, 11};
      11  int B[N] = {144,195,210,225,172,128,105,60, 92, 136,225,280,268,390,324,55};
      12  
      13  __attribute__((noinline))
      14  void foo ()
      15  {
      16    for (int i = 0; i < N; i++)
      17      {
      18        int m = (A[i] & i) ? 5 : 4;
      19        A[i] = A[i] * m;
      20      }
      21  }
      22  
      23  int main ()
      24  {
      25  
      26    check_vect ();
      27    foo ();
      28    /* check results:  */
      29    for (int i = 0; i < N; i++)
      30      if (A[i] != B[i])
      31        abort ();
      32  
      33    return 0;
      34  }
      35  
      36  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */