aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/vslv-1.c
blob: c0f1370cd6219bf5d235af51ccc821fe4610ca25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-mdejagnu-cpu=power9 -mvsx" } */
/* { dg-require-effective-target powerpc_vsx } */

#include <altivec.h>

__vector unsigned char
doCharShiftLeft (__vector unsigned char *p, __vector unsigned char *q)
{
  __vector unsigned char result, input, shift_distance;
  result = vec_slv (input, shift_distance);
  return result;
}

/* { dg-final { scan-assembler "vslv" } } */