aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr82460-2.c
blob: 4a45beed715e2cb4efa63386bc525545b71c1e37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR target/82460 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -mavx512vbmi -mprefer-vector-width=none" } */
/* We want to reuse the permutation mask in the loop, so use vpermt2b rather
   than vpermi2b.  */
/* { dg-final { scan-assembler-not {\mvpermi2b\M} } } */
/* { dg-final { scan-assembler {\mvpermt2b\M} } } */

void
foo (unsigned char *__restrict__ x, const unsigned short *__restrict__ y,
     unsigned long z)
{
  unsigned char *w = x + z;
  do
    *x++ = *y++ >> 8;
  while (x < w);
}