1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-mdejagnu-cpu=power9" } */
4 
5 #include <stddef.h>
6 #include <altivec.h>
7 
8 signed char
fetch_data(unsigned int offset,vector signed char * datap)9 fetch_data (unsigned int offset, vector signed char *datap)
10 {
11   vector signed char data = *datap;
12 
13   return vec_xlx (offset, data);
14 }
15 
16 /* { dg-final { scan-assembler "vextublx" } } */
17