(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
pr59354.c
       1  /* { dg-additional-options "-O3" } */
       2  
       3  #include "tree-vect.h"
       4  
       5  void abort (void);
       6  
       7  unsigned int a[256];
       8  unsigned char b[256];
       9  
      10  __attribute__ ((noinline)) void
      11  main1()
      12  {
      13    int i, z, x, y;
      14  
      15    for(i = 0; i < 256; i++)
      16      {
      17        a[i] = i % 5;
      18        __asm__ volatile ("");
      19      }
      20  
      21    for (z = 0; z < 16; z++)
      22      for (y = 0; y < 4; y++)
      23        for (x = 0; x < 4; x++)
      24  	b[y*64 + z*4 + x] = a[z*16 + y*4 + x];
      25  
      26    if (b[4] != 1)
      27      abort ();
      28  }
      29  
      30  int main (void)
      31  {
      32    check_vect ();
      33  
      34    main1 ();
      35  
      36    return 0;
      37  }
      38  
      39  /* { dg-final { scan-tree-dump "vectorized 1 loop" "vect" { target { vect_pack_trunc } } } } */