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 float
fetch_data(unsigned int offset,vector float * datap)9 fetch_data (unsigned int offset, vector float *datap)
10 {
11   vector float data = *datap;
12 
13   return vec_xlx (offset, data);
14 }
15 
16 /* { dg-final { scan-assembler "vextuwlx" } } */
17