1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-skip-if "" { powerpc*-*-aix* } } */
5 /* { dg-options "-mcpu=power9" } */
6 
7 #include <altivec.h>
8 
9 __vector unsigned char
doCharShiftLeft(__vector unsigned char * p,__vector unsigned char * q)10 doCharShiftLeft (__vector unsigned char *p, __vector unsigned char *q)
11 {
12   __vector unsigned char result, input, shift_distance;
13   result = vec_srv (input, shift_distance);
14   return result;
15 }
16 
17 /* { dg-final { scan-assembler "vsrv" } } */
18