(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
vect-reduc-mul_2.c
       1  /* { dg-require-effective-target vect_int_mult } */
       2  /* { dg-require-effective-target whole_vector_shift } */
       3  
       4  /* Write a reduction loop to be reduced using vector shifts and folded.  */
       5  
       6  #include "tree-vect.h"
       7  
       8  extern void abort(void);
       9  
      10  int
      11  main (unsigned char argc, char **argv)
      12  {
      13    unsigned char in[16];
      14    unsigned char i = 0;
      15    unsigned char sum = 1;
      16  
      17    check_vect ();
      18  
      19    for (i = 0; i < 16; i++)
      20      in[i] = i + i + 1;
      21  
      22    for (i = 0; i < 16; i++)
      23      sum *= in[i];
      24  
      25    if (sum != 33)
      26      {
      27        __builtin_printf("Failed %d\n", sum);
      28        abort();
      29      }
      30  
      31    return 0;
      32  }
      33  
      34  /* { dg-final { scan-tree-dump "Reduce using vector shifts" "vect" } } */
      35