1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-cpu pwr10 \
3 // RUN: -target-feature -mma -fsyntax-only %s -verify
5 void test1(unsigned char *vqp
, unsigned char *vpp
, vector
unsigned char vc
, unsigned char *resp
) {
7 __builtin_vsx_assemble_pair(&res
, vc
, vc
);
10 void test2(unsigned char *vqp
, unsigned char *vpp
, vector
unsigned char vc
, unsigned char *resp
) {
11 __builtin_vsx_disassemble_pair(resp
, (__vector_pair
*)vpp
);
14 void test3(const __vector_pair
*vpp
, signed long offset
, const __vector_pair
*vp2
) {
15 __vector_pair vp
= __builtin_vsx_lxvp(offset
, vpp
);
16 __builtin_vsx_stxvp(vp
, offset
, vp2
);
19 void test4(unsigned char *vqp
, unsigned char *vpp
, vector
unsigned char vc
, unsigned char *resp
) {
20 __vector_quad vq
= *((__vector_quad
*)vqp
);
21 __vector_pair vp
= *((__vector_pair
*)vpp
);
22 __builtin_mma_xxmtacc(&vq
); // expected-error {{this builtin is only valid on POWER10 or later CPUs}}
23 *((__vector_quad
*)resp
) = vq
;
26 void test5(unsigned char *vqp
, unsigned char *vpp
, vector
unsigned char vc
, unsigned char *resp
) {
27 __vector_quad vq
= *((__vector_quad
*)vqp
);
28 __vector_pair vp
= *((__vector_pair
*)vpp
);
29 __builtin_mma_pmxvf64ger(&vq
, vp
, vc
, 0, 0); // expected-error {{this builtin is only valid on POWER10 or later CPUs}}
30 *((__vector_quad
*)resp
) = vq
;