1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-cpu pwr10 \
3 // RUN: -target-feature -paired-vector-memops -fsyntax-only %s -verify
4 // RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-cpu pwr9 \
5 // RUN: -fsyntax-only %s -verify
7 void test1(unsigned char *vqp
, unsigned char *vpp
, vector
unsigned char vc
, unsigned char *resp
) {
9 __builtin_vsx_assemble_pair(&res
, vc
, vc
); // expected-error {{this builtin is only valid on POWER10 or later CPUs}}
12 void test2(unsigned char *vqp
, unsigned char *vpp
, vector
unsigned char vc
, unsigned char *resp
) {
13 __builtin_vsx_disassemble_pair(resp
, (__vector_pair
*)vpp
); // expected-error {{this builtin is only valid on POWER10 or later CPUs}}
16 void test3(const __vector_pair
*vpp
, signed long long offset
, const __vector_pair
*vp2
) {
17 __vector_pair vp
= __builtin_vsx_lxvp(offset
, vpp
); // expected-error {{this builtin is only valid on POWER10 or later CPUs}}
18 __builtin_vsx_stxvp(vp
, offset
, vp2
); // expected-error {{this builtin is only valid on POWER10 or later CPUs}}
21 void test4(unsigned char *vqp
, unsigned char *vpp
, vector
unsigned char vc
, unsigned char *resp
) {
22 __vector_quad vq
= *((__vector_quad
*)vqp
);
23 __vector_pair vp
= *((__vector_pair
*)vpp
);
24 __builtin_mma_xxmtacc(&vq
); // expected-error {{this builtin is only valid on POWER10 or later CPUs}}
25 *((__vector_quad
*)resp
) = vq
;