blob: 4a45beed715e2cb4efa63386bc525545b71c1e37 [file] [log] [blame]
/* 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);
}