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-options "-mcpu=power9" } */
5
6 #include <stddef.h>
7 #include <altivec.h>
8
9 signed int
fetch_data(unsigned int offset,vector signed int * datap)10 fetch_data (unsigned int offset, vector signed int *datap)
11 {
12 vector signed int data = *datap;
13
14 return vec_xlx (offset, data);
15 }
16
17 /* { dg-final { scan-assembler "vextuwlx" } } */
18