aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/slp-gap-1.c
blob: 36463ca22c580d9e3352f65173928847ee58ddaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-additional-options "-O3" } */

typedef unsigned char uint8_t;
typedef short int16_t;
void pixel_sub_wxh(int16_t * __restrict diff, uint8_t *pix1, uint8_t *pix2) {
  for (int y = 0; y < 4; y++) {
    for (int x = 0; x < 4; x++)
      diff[x + y * 4] = pix1[x] - pix2[x];
    pix1 += 16;
    pix2 += 32;
  }
}

/* We can vectorize this without peeling for gaps and thus without epilogue,
   but the only thing we can reliably scan is the zero-padding trick for the
   partial loads.  */
/* { dg-final { scan-tree-dump-times "\{_\[0-9\]\+, 0" 6 "vect" { target vect64 } } } */